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

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

UserSession::__construct

public UserSession::__construct(array $values = array()) Constructs a new user session. Parameters array $values: Array of initial values for the user session. File core/lib/Drupal/Core/Session/UserSession.php, line 76 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function __construct(array $values = array()) { foreach ($values as $key => $value) { $this->$key = $value; } }

UserSession::isAuthenticated

public UserSession::isAuthenticated() Returns TRUE if the account is authenticated. Return value bool TRUE if the account is authenticated. Overrides AccountInterface::isAuthenticated File core/lib/Drupal/Core/Session/UserSession.php, line 117 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function isAuthenticated() { return $this->uid > 0; }

UserSession::id

public UserSession::id() Returns the user ID or 0 for anonymous. Return value int The user ID. Overrides AccountInterface::id File core/lib/Drupal/Core/Session/UserSession.php, line 85 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function id() { return $this->uid; }

UserSession::isAnonymous

public UserSession::isAnonymous() Returns TRUE if the account is anonymous. Return value bool TRUE if the account is anonymous. Overrides AccountInterface::isAnonymous File core/lib/Drupal/Core/Session/UserSession.php, line 124 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function isAnonymous() { return $this->uid == 0; }

UserSession::getTimeZone

public UserSession::getTimeZone() Returns the timezone of this account. Return value string Name of the timezone. Overrides AccountInterface::getTimeZone File core/lib/Drupal/Core/Session/UserSession.php, line 187 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function getTimeZone() { return $this->timezone; }

UserSession::getUsername

public UserSession::getUsername() Returns the unaltered login name of this account. Return value string An unsanitized plain-text string with the name of this account that is used to log in. Only display this name to admins and to the user who owns this account, and only in the context of the name used to log in. For any other display purposes, use \Drupal\Core\Session\AccountInterface::getDisplayName() instead. Overrides AccountInterface::getUsername Deprecated in Drupal 8.0.0, will be remo

UserSession::getRoles

public UserSession::getRoles($exclude_locked_roles = FALSE) Returns a list of roles. Parameters bool $exclude_locked_roles: (optional) If TRUE, locked roles (anonymous/authenticated) are not returned. Return value array List of role IDs. Overrides AccountInterface::getRoles File core/lib/Drupal/Core/Session/UserSession.php, line 92 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function getRoles($exclud