Drupal::currentUser

public static Drupal::currentUser()

Gets the current active user.

Return value

\Drupal\Core\Session\AccountProxyInterface

File

core/lib/Drupal.php, line 246
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function currentUser() {
  return static::getContainer()->get('current_user');
}
doc_Drupal
2016-10-29 09:02:43
Comments
Leave a Comment

Please login to continue.