AccountInterface::id

public AccountInterface::id() Returns the user ID or 0 for anonymous. Return value int The user ID. File core/lib/Drupal/Core/Session/AccountInterface.php, line 31 Class AccountInterface Defines an account interface which represents the current user. Namespace Drupal\Core\Session Code public function id();

AccountInterface::getDisplayName

public AccountInterface::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. Eithe

AccountInterface::getPreferredAdminLangcode

public AccountInterface::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 languag

AccountInterface::getAccountName

public AccountInterface::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. File core/lib/Drupal/Core/Session/AccountInterface.php, line 129 Class

AccountInterface::getLastAccessedTime

public AccountInterface::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. File core/lib/Drupal/Core/Session/AccountInterface.php, line 172 Class AccountInterface Defines an account interface which represents the current user. Namespace Drupal\Core\Session Code public function getLastAccessedTime();

AccountInterface::getPreferredLangcode

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

AccountInterface::getEmail

public AccountInterface::getEmail() Returns the email address of this account. Return value string The email address. File core/lib/Drupal/Core/Session/AccountInterface.php, line 154 Class AccountInterface Defines an account interface which represents the current user. Namespace Drupal\Core\Session Code public function getEmail();

AccountInterface::AUTHENTICATED_ROLE

Role ID for authenticated users. File core/lib/Drupal/Core/Session/AccountInterface.php, line 23 Class AccountInterface Defines an account interface which represents the current user. Namespace Drupal\Core\Session Code const AUTHENTICATED_ROLE = 'authenticated';

AccountInterface::ANONYMOUS_ROLE

Role ID for anonymous users. File core/lib/Drupal/Core/Session/AccountInterface.php, line 18 Class AccountInterface Defines an account interface which represents the current user. Namespace Drupal\Core\Session Code const ANONYMOUS_ROLE = 'anonymous';

AccountInterface

Defines an account interface which represents the current user. Defines an object that has a user id, roles and can have session data. The interface is implemented both by the global session and the user entity. Hierarchy interface \Drupal\Core\Session\AccountInterface Related topics User accounts, permissions, and roles API for user accounts, access checking, roles, and permissions. File core/lib/Drupal/Core/Session/AccountInterface.php, line 13 Namespace Drupal\Core\Session Members