UserSession::$preferred_admin_langcode

The preferred administrative language code of the account. Type: string File core/lib/Drupal/Core/Session/UserSession.php, line 54 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code protected $preferred_admin_langcode;

UserSession::$preferred_langcode

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

UserSession::$roles

List of the roles this user has. Defaults to the anonymous role. Type: array File core/lib/Drupal/Core/Session/UserSession.php, line 26 Class UserSession An implementation of the user account interface for the global user. Namespace Drupal\Core\Session Code protected $roles = array(AccountInterface::ANONYMOUS_ROLE);

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;

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