public function DatabaseBackend::clear

Implements Drupal\Core\Flood\FloodInterface::clear().

Overrides FloodInterface::clear

File

drupal/core/lib/Drupal/Core/Flood/DatabaseBackend.php, line 66
Definition of Drupal\Core\Flood\DatabaseBackend.

Class

DatabaseBackend
Defines the database flood backend. This is the default Drupal backend.

Namespace

Drupal\Core\Flood

Code

public function clear($name, $identifier = NULL) {
  if (!isset($identifier)) {
    $identifier = $this->request
      ->getClientIp();
  }
  $this->connection
    ->delete('flood')
    ->condition('event', $name)
    ->condition('identifier', $identifier)
    ->execute();
}