UserAccessControlHandler::checkAccess

protected UserAccessControlHandler::checkAccess(EntityInterface $entity, $operation, AccountInterface $account) Performs access checks. This method is supposed to be overwritten by extending classes that do their own custom access checking. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for which to check access. string $operation: The entity operation. Usually one of 'view', 'view label', 'update' or 'delete'. \Drupal\Core\Session\AccountInterface $account: The user for wh

UserAccessControlHandler::checkFieldAccess

protected UserAccessControlHandler::checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) Default field access as determined by this access control handler. Parameters string $operation: The operation access should be checked for. Usually one of "view" or "edit". \Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition. \Drupal\Core\Session\AccountInterface $account: The user session

UserAccessControlHandler

Defines the access control handler for the user entity type. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityAccessControlHandler implements EntityAccessControlHandlerInterfaceclass \Drupal\user\UserAccessControlHandler See also \Drupal\user\Entity\User File core/modules/user/src/UserAccessControlHandler.php, line 17 Namespace Drupal\user Members Name Modifiers Type Description De

User::setExistingPassword

public User::setExistingPassword($password) Sets the existing plain text password. Required for validation when changing the password, name or email fields. Parameters string $password: The existing plain text password of the user. Return value $this Overrides UserInterface::setExistingPassword File core/modules/user/src/Entity/User.php, line 390 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function setExistingPassword($password) { $this->ge

User::setUsername

public User::setUsername($username) Sets the username of this account. Parameters string $username: The new user name. Return value \Drupal\user\UserInterface The called user entity. Overrides UserInterface::setUsername File core/modules/user/src/Entity/User.php, line 382 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function setUsername($username) { $this->set('name', $username); return $this; }

User::setLastLoginTime

public User::setLastLoginTime($timestamp) Sets the UNIX timestamp when the user last logged in. Parameters int $timestamp: Timestamp of the last login time. Return value \Drupal\user\UserInterface The called user entity. Overrides UserInterface::setLastLoginTime File core/modules/user/src/Entity/User.php, line 266 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function setLastLoginTime($timestamp) { $this->get('login')->value = $timestamp;

User::setPassword

public User::setPassword($password) Sets the user password. Parameters string $password: The new unhashed password. Return value \Drupal\user\UserInterface The called user entity. Overrides UserInterface::setPassword File core/modules/user/src/Entity/User.php, line 214 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function setPassword($password) { $this->get('pass')->value = $password; return $this; }

User::setLastAccessTime

public User::setLastAccessTime($timestamp) Sets the UNIX timestamp when the user last accessed the site.. Parameters int $timestamp: Timestamp of the last access. Return value \Drupal\user\UserInterface The called user entity. Overrides UserInterface::setLastAccessTime File core/modules/user/src/Entity/User.php, line 251 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function setLastAccessTime($timestamp) { $this->get('access')->value = $ti

User::setEmail

public User::setEmail($mail) Sets the email address of the user. Parameters string $mail: The new email address of the user. Return value \Drupal\user\UserInterface The called user entity. Overrides UserInterface::setEmail File core/modules/user/src/Entity/User.php, line 229 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function setEmail($mail) { $this->get('mail')->value = $mail; return $this; }

User::preSave

public User::preSave(EntityStorageInterface $storage) Acts on an entity before the presave hook is invoked. Used before the entity is saved and before invoking the presave hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. This is different from its counterpart in the Field API, FieldItemListInterface::preSave(), which is fired on all field translations automatic