The current user service. Type:
The original state of session saving prior to account switching. Type: bool File
A stack of previous overridden accounts. Type: \Drupal\Core\Session\AccountInterface[] File
public AccountSwitcher::__construct(AccountProxyInterface $current_user
The write-safe session handler. Type:
public AccountSwitcher::switchTo(AccountInterface $account)
An implementation of AccountSwitcherInterface. This allows for safe switching of user accounts by ensuring that session data for one user is
public AccountSwitcher::switchBack()