Skip to content
Snippets Groups Projects
Commit 83f2889f authored by tushar1's avatar tushar1 Committed by Anton Ivanov
Browse files

Issue #3290279 by Project Update Bot, Tushar1, Xen, arti_parmar, Aamir M,...

Issue #3290279 by Project Update Bot, Tushar1, Xen, arti_parmar, Aamir M, rahul17: Automated Drupal 10 compatibility fixes
parent bde24fdf
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ class UserEmailVerificationVerify extends ControllerBase implements ContainerInj
$this->messenger()->addStatus($this->t('Thank you for verifying your Email address.'));
$event = new UserEmailVerificationVerifyEvent($user, $user->isBlocked());
$this->eventDispatcher->dispatch(UserEmailVerificationEvents::VERIFY, $event);
$this->eventDispatcher->dispatch($event, UserEmailVerificationEvents::VERIFY);
$rules_event = new UserEmailVerificationRulesEmailVerified($user);
$this->eventDispatcher->dispatch($rules_event, $rules_event::EVENT_NAME);
......
......@@ -111,7 +111,7 @@ class UserEmailVerificationVerifyExtended extends ControllerBase implements Cont
$this->messenger()->addStatus($this->t('Thank you for verifying your Email address.'));
$event = new UserEmailVerificationVerifyEvent($user, $user->isBlocked());
$this->eventDispatcher->dispatch(UserEmailVerificationEvents::VERIFY_EXTENDED, $event);
$this->eventDispatcher->dispatch($event, UserEmailVerificationEvents::VERIFY_EXTENDED);
$rules_event = new UserEmailVerificationRulesEmailVerifiedExtended($user);
$this->eventDispatcher->dispatch($rules_event, $rules_event::EVENT_NAME);
......
......@@ -2,8 +2,8 @@
namespace Drupal\user_email_verification\Event;
use Symfony\Contracts\EventDispatcher\Event;
use Drupal\user\UserInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Wraps a user account block event for event subscribers.
......
......@@ -2,8 +2,8 @@
namespace Drupal\user_email_verification\Event;
use Symfony\Contracts\EventDispatcher\Event;
use Drupal\user\UserInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Wraps a user email verification creation event for event subscribers.
......
......@@ -2,8 +2,8 @@
namespace Drupal\user_email_verification\Event;
use Symfony\Contracts\EventDispatcher\Event;
use Drupal\user\UserInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Wraps a user account delete event for event subscribers.
......
......@@ -2,8 +2,8 @@
namespace Drupal\user_email_verification\Event;
use Symfony\Contracts\EventDispatcher\Event;
use Drupal\user\UserInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Wraps a user email verification event for event subscribers.
......
......@@ -91,7 +91,7 @@ class UserEmailVerificationVerifyUserEmail extends RulesActionBase implements Co
$this->userEmailVerification->setEmailVerifiedByUserId($user->id());
$event = new UserEmailVerificationVerifyEvent($user, $user->isBlocked());
$this->eventDispatcher->dispatch(UserEmailVerificationEvents::VERIFY, $event);
$this->eventDispatcher->dispatch($event, UserEmailVerificationEvents::VERIFY);
// If the user is considered as blocked, notify the administrator.
if ($event->notifyAsBlocked()) {
......
......@@ -373,7 +373,7 @@ class UserEmailVerification implements UserEmailVerificationInterface {
// Provide an ability to other modules to modify
// verified state (like auto-verify some specific users).
$event = new UserEmailVerificationCreateVerificationEvent($user, (bool) $verified);
$this->eventDispatcher->dispatch(UserEmailVerificationEvents::CREATE_VERIFICATION, $event);
$this->eventDispatcher->dispatch($event, UserEmailVerificationEvents::CREATE_VERIFICATION);
if ($verify || $event->shouldBeVerified()) {
$verified = $this->time->getRequestTime();
......@@ -463,7 +463,7 @@ class UserEmailVerification implements UserEmailVerificationInterface {
// Provide an ability to other modules to act before
// account block (like prevent some accounts block).
$event = new UserEmailVerificationBlockAccountEvent($user, $user->isActive());
$this->eventDispatcher->dispatch(UserEmailVerificationEvents::BLOCK_ACCOUNT, $event);
$this->eventDispatcher->dispatch($event, UserEmailVerificationEvents::BLOCK_ACCOUNT);
if ($event->shouldBeBlocked()) {
$user->block()->save();
......@@ -570,7 +570,7 @@ class UserEmailVerification implements UserEmailVerificationInterface {
// Provide an ability to other modules to act before
// account delete (like prevent some accounts delete).
$event = new UserEmailVerificationDeleteAccountEvent($user, TRUE);
$this->eventDispatcher->dispatch(UserEmailVerificationEvents::DELETE_ACCOUNT, $event);
$this->eventDispatcher->dispatch($event, UserEmailVerificationEvents::DELETE_ACCOUNT);
if ($event->shouldBeDeleted()) {
$this->setVerificationState($user->id(), UserEmailVerificationInterface::STATE_DELETED);
......@@ -719,6 +719,7 @@ class UserEmailVerification implements UserEmailVerificationInterface {
if ($active_only) {
$query->condition('status', 1);
}
$query->accessCheck(FALSE);
$uids = $query->execute();
$uid = reset($uids);
......
......@@ -3,7 +3,7 @@ type: module
description: 'Verify the user Email. If the Email of the user is not verified the system will block the user.'
package: User
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
configure: user_email_verification.settings_form
dependencies:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment