You are here

function shib_auth_cancel_custom in Shibboleth Authentication 6.4

Same name and namespace in other branches
  1. 7.4 shib_auth.module \shib_auth_cancel_custom()

Cancel button is pressed, redirect user to shib logout, and then to the page he came from / loginurl

1 call to shib_auth_cancel_custom()
shib_auth_custom_form in ./shib_auth.module
If any customization or consent option is enabled, the custom form will show up before registering and forces the user to accept user consent and define username and/or e-mail address (prefilling fields with the data coming from the…

File

./shib_auth.module, line 490
Drupal Shibboleth authentication module.

Code

function shib_auth_cancel_custom() {
  $logouthandler = shib_auth_get_redirect_base(shib_auth_config('full_logout_url'));
  if (isset($_SESSION['shib_auth_custom_form_url'])) {
    $redirect_url = url($_SESSION['shib_auth_custom_form_url'], array(
      'absolute' => TRUE,
    ));
    unset($_SESSION['shib_auth_custom_form_url']);
    shib_auth_redirect($logouthandler, $redirect_url);
  }
}