You are here

public function UserSwitch::isSwitchUser in User Switch 8

Check session.

Return value

bool TRUE when user switch account, FALSE otherwise.

File

src/UserSwitch.php, line 82

Class

UserSwitch
Defines a UserSwitch service to switch user account.

Namespace

Drupal\userswitch

Code

public function isSwitchUser() {
  return !empty($_SESSION['SwitchCurrentUser']);
}