protected EntityAccessControlHandler::prepareUser(AccountInterface $account = NULL)
Loads the current account object, if it does not exist yet.
Parameters
\Drupal\Core\Session\AccountInterface $account: The account interface instance.
Return value
\Drupal\Core\Session\AccountInterface Returns the current account object.
File
- core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php, line 290
Class
- EntityAccessControlHandler
- Defines a default implementation for entity access control handler.
Namespace
Drupal\Core\Entity
Code
1 2 3 4 5 6 | protected function prepareUser(AccountInterface $account = NULL) { if (! $account ) { $account = \Drupal::currentUser(); } return $account ; } |
Please login to continue.