Commit 9fbc8c84 authored by Jason Woods's avatar Jason Woods Committed by Fabian de Rijk
Browse files

Issue #3315536: getEventIds ignores the $event parameter

parent ed053fe0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ class FloodUnblockManager implements FloodUnblockManagerInterface {
  public function getEventIds($event, $identifier = NULL) {
    $event_ids = [];
    $query = $this->database->select('flood', 'f');
    $query->condition('event', $event);
    if ($identifier) {
      $query->condition('f.identifier', $identifier, 'LIKE');
    }
+6 −4
Original line number Diff line number Diff line
@@ -61,25 +61,27 @@ interface FloodUnblockManagerInterface {
  /**
   * Provides identifier's flood status.
   *
   * @param string $event
   *   The flood event name.
   * @param string $identifier
   *   The identifier: IP address and/or UID.
   * @param string $event
   *   The flood event name.
   *
   * @return bool
   *   Whether the identifier is blocked.
   */
  public function isBlocked($event, $identifier);
  public function isBlocked($identifier, $event);

  /**
   * Provides list of event IDs.
   *
   * @param string $event
   *   The flood event name.
   * @param string $identifier
   *   Database LIKE query parameter for matching event IDs.
   *
   * @return array
   *   List of event IDs.
   */
  public function getEventIds($event);
  public function getEventIds($event, $identifier = null);

}