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\userswitchCode
public function isSwitchUser() {
return !empty($_SESSION['SwitchCurrentUser']);
}