UserSession::getRoleStorage

protected UserSession::getRoleStorage() Returns the role storage object. Return value \Drupal\user\RoleStorageInterface The role storage object. File core/lib/Drupal/Core/Session/UserSession.php, line 204 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code protected function getRoleStorage() { return \Drupal::entityManager()->getStorage('user_role'); }

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

UserSession::getPreferredLangcode

UserSession::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 (i

UserSession::getPreferredAdminLangcode

UserSession::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

UserSession::getLastAccessedTime

public UserSession::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/lib/Drupal/Core/Session/UserSession.php, line 194 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code public function getLastAccessedTime() { return $this->

UserSession::getEmail

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

UserSession::getDisplayName

public UserSession::getDisplayName() Returns the display name of this account. By default, the passed-in object's 'name' property is used if it exists, or else, the site-defined value for the 'anonymous' variable. However, a module may override this by implementing hook_user_format_name_alter(&$name, $account). Return value string|\Drupal\Component\Render\MarkupInterface Either a string that will be auto-escaped on output or a MarkupInterface object that is already HTML escaped. Either is

UserSession::getAccountName

public UserSession::getAccountName() 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 login. For any other display purposes, use \Drupal\Core\Session\AccountInterface::getDisplayName() instead. Overrides AccountInterface::getAccountName File core/lib/Drupal/Core/Session/Use

UserSession::$uid

User ID. Type: int File core/lib/Drupal/Core/Session/UserSession.php, line 17 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code protected $uid = 0;

UserSession::$timezone

The timezone of this account. Type: string File core/lib/Drupal/Core/Session/UserSession.php, line 68 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code protected $timezone;