public function UserSwitch::getUserId in User Switch 8
Return original user id, FALSE otherwise.
File
- src/
UserSwitch.php, line 89
Class
- UserSwitch
- Defines a UserSwitch service to switch user account.
Namespace
Drupal\userswitchCode
public function getUserId() {
if (isset($_SESSION['SwitchCurrentUser'])) {
return $_SESSION['SwitchCurrentUser'];
}
else {
return FALSE;
}
}