AccountProxy::getAccountName

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

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

AccountProxy::getDisplayName

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

AccountProxy::getEmail

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

AccountProxy::$initialAccountId

Initial account id. Type: int File core/lib/Drupal/Core/Session/AccountProxy.php, line 30 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code protected $initialAccountId;

AccountProxy::getAccount

public AccountProxy::getAccount() Gets the currently wrapped account. Return value \Drupal\Core\Session\AccountInterface The current account. Overrides AccountProxyInterface::getAccount File core/lib/Drupal/Core/Session/AccountProxy.php, line 48 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code public function getAccount() { if (!isset($this->account)) { if ($this->initialAccountId) { // After the container is rebuilt

AccountProxy::$account

The instantiated account. Type: \Drupal\Core\Session\AccountInterface File core/lib/Drupal/Core/Session/AccountProxy.php, line 23 Class AccountProxy A proxied implementation of AccountInterface. Namespace Drupal\Core\Session Code protected $account;

AccountProxy

A proxied implementation of AccountInterface. The reason why we need an account proxy is that we don't want to have global state directly stored in the container. This proxy object avoids multiple invocations of the authentication manager which can happen if the current user is accessed in constructors. It also allows legacy code to change the current user where the user cannot be directly injected into dependent code. Hierarchy class \Drupal\Core\Session\AccountProxy implements AccountProxyInt

AccountPermissionsCacheContext::getLabel

public static AccountPermissionsCacheContext::getLabel() Returns the label of the cache context. Return value string The label of the cache context. Overrides CacheContextInterface::getLabel File core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php, line 39 Class AccountPermissionsCacheContext Defines the AccountPermissionsCacheContext service, for "per permission" caching. Namespace Drupal\Core\Cache\Context Code public static function getLabel() { return t("Accoun

AccountPermissionsCacheContext::__construct

public AccountPermissionsCacheContext::__construct(AccountInterface $user, PermissionsHashGeneratorInterface $permissions_hash_generator) Constructs a new UserCacheContext service. Parameters \Drupal\Core\Session\AccountInterface $user: The current user. \Drupal\Core\Session\PermissionsHashGeneratorInterface $permissions_hash_generator: The permissions hash generator. Overrides UserCacheContextBase::__construct File core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php, line 31