You are here

protected function AccessCheckBase::loadUserEntityFromAccountProxy in Allowed Languages 8

Loads a user entity based on account proxy object.

Parameters

\Drupal\Core\Session\AccountInterface $account: The account proxy used to load the full user entity.

Return value

\Drupal\Core\Entity\EntityInterface|\Drupal\user\UserInterface|null User entity or NULL.

2 calls to AccessCheckBase::loadUserEntityFromAccountProxy()
ContentTranslationAccessCheck::access in src/Access/ContentTranslationAccessCheck.php
Check language access when managing content translations.
EntityAccessCheck::access in src/Access/EntityAccessCheck.php
Allowed languages entity access check.

File

src/Access/AccessCheckBase.php, line 76

Class

AccessCheckBase
Allowed languages access check base class.

Namespace

Drupal\allowed_languages\Access

Code

protected function loadUserEntityFromAccountProxy(AccountInterface $account) {
  return $this->entityTypeManager
    ->getStorage('user')
    ->load($account
    ->id());
}