public function PasswordPolicyEventSubscriber::__construct in Password Policy 8.3
PasswordPolicyEventSubscriber constructor.
Parameters
\Drupal\Core\Session\AccountProxyInterface $currentUser: The currently logged in user.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
EventSubscriber/ PasswordPolicyEventSubscriber.php, line 67
Class
- PasswordPolicyEventSubscriber
- Enforces password reset functionality.
Namespace
Drupal\password_policy\EventSubscriberCode
public function __construct(AccountProxyInterface $currentUser, EntityTypeManagerInterface $entityTypeManager, MessengerInterface $messenger, RequestStack $requestStack) {
$this->currentUser = $currentUser;
$this->messenger = $messenger;
$this->request = $requestStack
->getCurrentRequest();
$this->userStorage = $entityTypeManager
->getStorage('user');
}