protected EntityAccessControlHandler::prepareUser(AccountInterface $account = NULL)
Loads the current account object, if it does not exist yet.
\Drupal\Core\Session\AccountInterface $account: The account interface instance.
\Drupal\Core\Session\AccountInterface Returns the current account object.
protected function prepareUser(AccountInterface $account = NULL) { if (!$account) { $account = \Drupal::currentUser(); } return $account; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityAccessControlHandler.php/function/EntityAccessControlHandler::prepareUser/8.1.x