User::getUsername

public User::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 removed bef

User::getTimeZone

public User::getTimeZone() Returns the timezone of this account. Return value string Name of the timezone. Overrides AccountInterface::getTimeZone File core/modules/user/src/Entity/User.php, line 304 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function getTimeZone() { return $this->get('timezone')->value; }

User::getRoleStorage

protected User::getRoleStorage() Returns the role storage object. Return value \Drupal\user\RoleStorageInterface The role storage object. File core/modules/user/src/Entity/User.php, line 546 Class User Defines the user entity class. Namespace Drupal\user\Entity Code protected function getRoleStorage() { return \Drupal::entityManager()->getStorage('user_role'); }

User::getRoles

public User::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/modules/user/src/Entity/User.php, line 142 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function getRoles($exclude_locked_roles = FALSE) { $roles = array(); // Users w

User::getPreferredLangcode

User::getPreferredLangcode($fallback_to_default = TRUE) Returns the preferred language code of the account. Parameters bool $fallback_to_default: (optional) Whether the return value will fall back to the site default language if the user has no language preference. Return value string The language code that is preferred by the account. If the preferred language is not set or is a language not configured anymore on the site, the site default is returned or an empty string is returned (if $fall

User::getPreferredAdminLangcode

User::getPreferredAdminLangcode($fallback_to_default = TRUE) Returns the preferred administrative language code of the account. Defines which language is used on administrative pages. Parameters bool $fallback_to_default: (optional) Whether the return value will fall back to the site default language if the user has no administration language preference. Return value string The language code that is preferred by the account for administration pages. If the preferred language is not set or is

User::getPassword

public User::getPassword() Returns the hashed password. Return value string The hashed password. Overrides UserInterface::getPassword File core/modules/user/src/Entity/User.php, line 207 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function getPassword() { return $this->get('pass')->value; }

User::getLastLoginTime

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

User::getLastAccessedTime

public User::getLastAccessedTime() The timestamp when the account last accessed the site. A value of 0 means the user has never accessed the site. Return value int Timestamp of the last access. Overrides AccountInterface::getLastAccessedTime File core/modules/user/src/Entity/User.php, line 244 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function getLastAccessedTime() { return $this->get('access')->value; }

User::getInitialEmail

public User::getInitialEmail() Returns the email that was used when the user was registered. Return value string Initial email address of the user. Overrides UserInterface::getInitialEmail File core/modules/user/src/Entity/User.php, line 339 Class User Defines the user entity class. Namespace Drupal\user\Entity Code public function getInitialEmail() { return $this->get('init')->value; }