protected FormBuilder::currentUser()
Gets the current active user.
\Drupal\Core\Session\AccountInterface
protected function currentUser() { if (!$this->currentUser && \Drupal::hasService('current_user')) { $this->currentUser = \Drupal::currentUser(); } return $this->currentUser; }
© 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!Form!FormBuilder.php/function/FormBuilder::currentUser/8.1.x