interface UserEmailVerificationInterface in User email verification 8
Interface defining User email verification helper service.
Hierarchy
- interface \Drupal\user_email_verification\UserEmailVerificationInterface
Expanded class hierarchy of UserEmailVerificationInterface
All classes that implement UserEmailVerificationInterface
8 files declare their use of UserEmailVerificationInterface
- UserEmailVerificationBlockAccount.php in src/
Plugin/ QueueWorker/ UserEmailVerificationBlockAccount.php - UserEmailVerificationDeleteAccount.php in src/
Plugin/ QueueWorker/ UserEmailVerificationDeleteAccount.php - UserEmailVerificationNeeded.php in src/
Cache/ Context/ UserEmailVerificationNeeded.php - UserEmailVerificationNotificationBlock.php in src/
Plugin/ Block/ UserEmailVerificationNotificationBlock.php - UserEmailVerificationReminders.php in src/
Plugin/ QueueWorker/ UserEmailVerificationReminders.php
File
- src/
UserEmailVerificationInterface.php, line 10
Namespace
Drupal\user_email_verificationView source
interface UserEmailVerificationInterface {
/**
* Table name which contains Email verification data.
*/
const VERIFICATION_TABLE_NAME = 'user_email_verification';
/**
* Queue "Block user account": Quantity of users to block by one queue item.
*/
const QUEUE_BLOCK_ACCOUNT_LIMIT = 10;
/**
* Queue "Remind an user": Quantity of users to remind by one queue item.
*/
const QUEUE_REMINDERS_LIMIT = 10;
/**
* Queue "Delete user account": Quantity of users to delete by one queue item.
*/
const QUEUE_DELETE_ACCOUNT_LIMIT = 10;
/**
* Return email validation interval.
*
* @return int
* Validate interval time in seconds.
*/
public function getValidateInterval();
/**
* Return quantity of reminders which should be used.
*
* @return int
* Reminders quantity.
*/
public function getNumReminders();
/**
* Return reminder interval (in seconds).
*
* @return int
* Reminder interval (in seconds).
*/
public function getReminderInterval();
/**
* Return role names which shouldn't have Email verification.
*
* @return array
* Role names to skip.
*/
public function getSkipRoles();
/**
* Return extended email validation interval.
*
* @return int
* Extended validate interval time in seconds.
*/
public function getExtendedValidateInterval();
/**
* Return verification mail subject.
*
* @return string
* Verification mail subject.
*/
public function getMailSubject();
/**
* Return verification mail body.
*
* @return string
* Verification mail body.
*/
public function getMailBody();
/**
* Return extended verification mail subject.
*
* @return string
* Extended verification mail subject.
*/
public function getExtendedMailSubject();
/**
* Return extended verification mail body.
*
* @return string
* Extended verification mail body.
*/
public function getExtendedMailBody();
/**
* Checks is extended period enabled or no.
*
* @return bool
* Is extended period enabled or no.
*/
public function isExtendedPeriodEnabled();
/**
* Build a base-64 encoded sha-256 HMAC.
*
* @param int $uid
* User ID.
* @param int $timestamp
* Timestamp value.
*
* @return string
* A base-64 encoded sha-256 hmac.
*/
public function buildHmac($uid, $timestamp);
/**
* Build Email verification URL for requested user.
*
* @param \Drupal\user\UserInterface $user
* User to create email verification URL for.
*
* @return \Drupal\Core\Url
* Email verification URL.
*/
public function buildVerificationUrl(UserInterface $user);
/**
* Build extended Email verification URL for requested user.
*
* @param \Drupal\user\UserInterface $user
* User to create email verification URL for.
*
* @return \Drupal\Core\Url
* Extended Email verification URL.
*/
public function buildExtendedVerificationUrl(UserInterface $user);
/**
* Load verification item for requested user ID.
*
* @param int $uid
* User ID.
*
* @return array|false
* Verification item data array on success or boolean FALSE otherwise.
*/
public function loadVerificationByUserId($uid);
/**
* Update verification for requested user: Set email verified.
*
* @param int $uid
* User ID.
*/
public function setEmailVerifiedByUserId($uid);
/**
* Create user email verification item.
*
* @param \Drupal\user\UserInterface $user
* User to create email verification item for.
* @param bool $verify
* Flag mark as verified/no on creation.
*/
public function createVerification(UserInterface $user, $verify = FALSE);
/**
* Delete user email verification item.
*
* @param \Drupal\user\UserInterface $user
* User to delete email verification item for.
*/
public function deleteVerification(UserInterface $user);
/**
* Handle cron related tasks.
*/
public function cronHandler();
/**
* Blocks user account by ID.
*
* @param int $uid
* User ID.
*/
public function blockUserAccountById($uid);
/**
* Send "Verify your Email" mail to requested user.
*
* @param int $uid
* User ID.
*
* @return bool
* Action result.
*/
public function sendVerifyMailById($uid);
/**
* Send "blocked account verified Email" mail to site administrator.
*
* @param \Drupal\user\UserInterface $user
* Blocked user who verified Email.
*
* @return bool
* Action result.
*/
public function sendVerifyBlockedMail(UserInterface $user);
/**
* Reminds user about verification user by ID.
*
* @param int $uid
* User ID.
*/
public function remindUserById($uid);
/**
* Delete user account by ID.
*
* @param int $uid
* User ID.
*/
public function deleteUserAccountById($uid);
/**
* Checks: Can we remind user right now.
*
* @param int $uid
* User ID.
*
* @return bool
* Result of check.
*/
public function isReminderNeeded($uid);
/**
* Checks: Is email verification needed for a requested user.
*
* @param int $uid
* User ID, optional, if not set - current user ID will be used.
*
* @return bool
* Result of check.
*/
public function isVerificationNeeded($uid = 0);
/**
* Fill email message with data. A hook_mail() handler.
*
* @param string $key
* A key to identify the email sent.
* @param array $message
* A message array to be filled in.
* @param array $params
* An array of message parameters.
*/
public function initEmailMessage($key, array &$message, array $params);
/**
* Load Drupal user by name or email.
*
* @param string $name_or_email
* User name/login or email.
* @param bool $active_only
* Whether to search for active users only.
*
* @return null|\Drupal\user\UserInterface
* Drupal user on success or NULL otherwise.
*/
public function getUserByNameOrEmail($name_or_email, $active_only);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UserEmailVerificationInterface:: |
public | function | Blocks user account by ID. | 1 |
UserEmailVerificationInterface:: |
public | function | Build extended Email verification URL for requested user. | 1 |
UserEmailVerificationInterface:: |
public | function | Build a base-64 encoded sha-256 HMAC. | 1 |
UserEmailVerificationInterface:: |
public | function | Build Email verification URL for requested user. | 1 |
UserEmailVerificationInterface:: |
public | function | Create user email verification item. | 1 |
UserEmailVerificationInterface:: |
public | function | Handle cron related tasks. | 1 |
UserEmailVerificationInterface:: |
public | function | Delete user account by ID. | 1 |
UserEmailVerificationInterface:: |
public | function | Delete user email verification item. | 1 |
UserEmailVerificationInterface:: |
public | function | Return extended verification mail body. | 1 |
UserEmailVerificationInterface:: |
public | function | Return extended verification mail subject. | 1 |
UserEmailVerificationInterface:: |
public | function | Return extended email validation interval. | 1 |
UserEmailVerificationInterface:: |
public | function | Return verification mail body. | 1 |
UserEmailVerificationInterface:: |
public | function | Return verification mail subject. | 1 |
UserEmailVerificationInterface:: |
public | function | Return quantity of reminders which should be used. | 1 |
UserEmailVerificationInterface:: |
public | function | Return reminder interval (in seconds). | 1 |
UserEmailVerificationInterface:: |
public | function | Return role names which shouldn't have Email verification. | 1 |
UserEmailVerificationInterface:: |
public | function | Load Drupal user by name or email. | 1 |
UserEmailVerificationInterface:: |
public | function | Return email validation interval. | 1 |
UserEmailVerificationInterface:: |
public | function | Fill email message with data. A hook_mail() handler. | 1 |
UserEmailVerificationInterface:: |
public | function | Checks is extended period enabled or no. | 1 |
UserEmailVerificationInterface:: |
public | function | Checks: Can we remind user right now. | 1 |
UserEmailVerificationInterface:: |
public | function | Checks: Is email verification needed for a requested user. | 1 |
UserEmailVerificationInterface:: |
public | function | Load verification item for requested user ID. | 1 |
UserEmailVerificationInterface:: |
constant | Queue "Block user account": Quantity of users to block by one queue item. | ||
UserEmailVerificationInterface:: |
constant | Queue "Delete user account": Quantity of users to delete by one queue item. | ||
UserEmailVerificationInterface:: |
constant | Queue "Remind an user": Quantity of users to remind by one queue item. | ||
UserEmailVerificationInterface:: |
public | function | Reminds user about verification user by ID. | 1 |
UserEmailVerificationInterface:: |
public | function | Send "blocked account verified Email" mail to site administrator. | 1 |
UserEmailVerificationInterface:: |
public | function | Send "Verify your Email" mail to requested user. | 1 |
UserEmailVerificationInterface:: |
public | function | Update verification for requested user: Set email verified. | 1 |
UserEmailVerificationInterface:: |
constant | Table name which contains Email verification data. |