function shib_auth_user in Shibboleth Authentication 6.4
Same name and namespace in other branches
- 5.3 shib_auth.module \shib_auth_user()
- 5.2 shib_auth.module \shib_auth_user()
- 6 shib_auth.module \shib_auth_user()
- 6.2 shib_auth.module \shib_auth_user()
- 6.3 shib_auth.module \shib_auth_user()
Let the user exit from the Shibboleth authority when he/she log out from the actual Drupal site.
Parameters
op What kind of action is being performed.:
edit The array of form values submitted by the user.:
account The user object on which the operation is being performed.:
category The active category of user information being edited.:
File
- ./
shib_auth.module, line 766 - Drupal Shibboleth authentication module.
Code
function shib_auth_user($op, &$edit, &$account, $category = NULL) {
global $user;
if ($op == 'logout') {
if (isset($_SESSION['shib_auth_authentication']) && $_SESSION['shib_auth_authentication'] === 'shib_auth') {
unset($_SESSION['shib_auth_rolelog']);
$logouthandler = shib_auth_get_redirect_base(shib_auth_config('full_logout_url'));
unset($_SESSION['shib_auth_authentication']);
$logout_redirect = url(shib_auth_config('logout_url'), array(
'absolute' => TRUE,
));
shib_auth_redirect($logouthandler, $logout_redirect);
}
}
elseif ($op == 'delete') {
db_query("DELETE FROM {shib_authmap} WHERE uid = %d", $account->uid);
}
}