UserStorage

Controller class for users. This extends the Drupal\Core\Entity\Sql\SqlContentEntityStorage class, adding required special handling for user objects. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityStorageBase implements EntityHandlerInterface, EntityStorageInterfaceclass \Drupal\Core\Entity\ContentEntityStorageBase implements ContentEntityStorageInterface, DynamicallyFieldableEntityStorageInterfacecl

UserStorage::deleteRoleReferences

public UserStorage::deleteRoleReferences(array $rids) Delete role references. Parameters array $rids: The list of role IDs being deleted. The storage should remove permission and user references to this role. Overrides UserStorageInterface::deleteRoleReferences File core/modules/user/src/UserStorage.php, line 67 Class UserStorage Controller class for users. Namespace Drupal\user Code public function deleteRoleReferences(array $rids) { // Remove the role from all users. $this->d

UserStorage::doSaveFieldItems

protected UserStorage::doSaveFieldItems(ContentEntityInterface $entity, array $names = []) Writes entity field values to the storage. This method is responsible for allocating entity and revision identifiers and updating the entity object with their values. Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: The entity object. string[] $names: (optional) The name of the fields to be written to the storage. If an empty value is passed all field values are saved. Overrides SqlContentE

UserStorage::isColumnSerial

protected UserStorage::isColumnSerial($table_name, $schema_name) Checks whether a field column should be treated as serial. Parameters $table_name: The name of the table the field column belongs to. $schema_name: The schema name of the field column. Return value bool TRUE if the column is serial, FALSE otherwise. Overrides SqlContentEntityStorage::isColumnSerial See also \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::processBaseTable() \Drupal\Core\Entity\Sql\SqlContentEntityStorageS

UserStorage::updateLastAccessTimestamp

public UserStorage::updateLastAccessTimestamp(AccountInterface $account, $timestamp) Update the last access timestamp of the user. Parameters \Drupal\Core\Session\AccountInterface $account: The user object. int $timestamp: The last access timestamp. Overrides UserStorageInterface::updateLastAccessTimestamp File core/modules/user/src/UserStorage.php, line 53 Class UserStorage Controller class for users. Namespace Drupal\user Code public function updateLastAccessTimestamp(AccountInterfa

UserStorage::updateLastLoginTimestamp

public UserStorage::updateLastLoginTimestamp(UserInterface $account) Update the last login timestamp of the user. Parameters \Drupal\user\UserInterface $account: Overrides UserStorageInterface::updateLastLoginTimestamp File core/modules/user/src/UserStorage.php, line 41 Class UserStorage Controller class for users. Namespace Drupal\user Code public function updateLastLoginTimestamp(UserInterface $account) { $this->database->update('users_field_data') ->fields(array('log

UserStorageInterface

Defines an interface for user entity storage classes. Hierarchy interface \Drupal\Core\Entity\EntityStorageInterfaceinterface \Drupal\Core\Entity\ContentEntityStorageInterfaceinterface \Drupal\user\UserStorageInterface File core/modules/user/src/UserStorageInterface.php, line 11 Namespace Drupal\user Members Name Modifiers Type Description ContentEntityStorageInterface::createTranslation public function Constructs a new entity translation object, without permanently sa

UserStorageInterface::deleteRoleReferences

public UserStorageInterface::deleteRoleReferences(array $rids) Delete role references. Parameters array $rids: The list of role IDs being deleted. The storage should remove permission and user references to this role. File core/modules/user/src/UserStorageInterface.php, line 37 Class UserStorageInterface Defines an interface for user entity storage classes. Namespace Drupal\user Code public function deleteRoleReferences(array $rids);

UserStorageInterface::updateLastAccessTimestamp

public UserStorageInterface::updateLastAccessTimestamp(AccountInterface $account, $timestamp) Update the last access timestamp of the user. Parameters \Drupal\Core\Session\AccountInterface $account: The user object. int $timestamp: The last access timestamp. File core/modules/user/src/UserStorageInterface.php, line 28 Class UserStorageInterface Defines an interface for user entity storage classes. Namespace Drupal\user Code public function updateLastAccessTimestamp(AccountInterface $a

UserStorageInterface::updateLastLoginTimestamp

public UserStorageInterface::updateLastLoginTimestamp(UserInterface $account) Update the last login timestamp of the user. Parameters \Drupal\user\UserInterface $account: File core/modules/user/src/UserStorageInterface.php, line 18 Class UserStorageInterface Defines an interface for user entity storage classes. Namespace Drupal\user Code public function updateLastLoginTimestamp(UserInterface $account);