NoreqnewpassFlood.php in No Request New Password 8
File
src/Services/NoreqnewpassFlood.php
View source
<?php
namespace Drupal\noreqnewpass\Services;
use Drupal\Core\Flood\FloodInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class NoreqnewpassFlood {
protected $flood;
public function __construct(FloodInterface $flood) {
$this->flood = $flood;
}
public static function create(ContainerInterface $container) {
return new static($container
->get('flood'));
}
public function noreqnewpassregister($name, $window = 3600, $identifier = NULL) {
$this->flood
->register($name, $window = 3600, $identifier);
}
public function noreqnewpassclear($name, $identifier = NULL) {
$this->flood
->clear($name, $identifier);
}
}
Classes
Name |
Description |
NoreqnewpassFlood |
Defines the database flood backend. This is the default Drupal backend. |