AccountSwitcher::$currentUser

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::currentUser
  2. 10 core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::currentUser
  3. 11.x core/lib/Drupal/Core/Session/AccountSwitcher.php \Drupal\Core\Session\AccountSwitcher::currentUser

The current user service.

Type: \Drupal\Core\Session\AccountProxyInterface

File

core/lib/Drupal/Core/Session/AccountSwitcher.php, line 26

Class

AccountSwitcher
An implementation of AccountSwitcherInterface.

Namespace

Drupal\Core\Session

Code

protected $currentUser = [];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.