AccountProxy::loadUserEntity

protected AccountProxy::loadUserEntity($account_id) Load a user entity. The entity manager requires additional initialization code and cache clearing after the list of modules is changed. Therefore it is necessary to retrieve it as late as possible. Because of serialization issues it is currently not possible to inject the container into the AccountProxy. Thus it is necessary to retrieve the entity manager statically. Parameters int $account_id: The id of an account to load. Return value \Dru

AccountProxy::isAuthenticated

public AccountProxy::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/AccountProxy.php, line 88 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function isAuthenticated() { return $this->getAccount()->isAuthenticated(); }

AccountProxy::isAnonymous

public AccountProxy::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/AccountProxy.php, line 95 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function isAnonymous() { return $this->getAccount()->isAnonymous(); }

AccountProxy::id

public AccountProxy::id() Returns the user ID or 0 for anonymous. Return value int The user ID. Overrides AccountInterface::id File core/lib/Drupal/Core/Session/AccountProxy.php, line 67 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function id() { return $this->getAccount()->id(); }

AccountProxy::hasPermission

public AccountProxy::hasPermission($permission) Checks whether a user has a certain permission. Parameters string $permission: The permission string to check. Return value bool TRUE if the user has the permission, FALSE otherwise. Overrides AccountInterface::hasPermission File core/lib/Drupal/Core/Session/AccountProxy.php, line 81 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function hasPermission($permission) { return $

AccountProxy::getUsername

public AccountProxy::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 rem

AccountProxy::getTimeZone

public AccountProxy::getTimeZone() Returns the timezone of this account. Return value string Name of the timezone. Overrides AccountInterface::getTimeZone File core/lib/Drupal/Core/Session/AccountProxy.php, line 144 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function getTimeZone() { return $this->getAccount()->getTimeZone(); }

AccountProxy::getRoles

public AccountProxy::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/AccountProxy.php, line 74 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function getRoles($exclude_locked_roles = FAL

AccountProxy::getPreferredLangcode

public AccountProxy::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 ret

AccountProxy::getPreferredAdminLangcode

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