You are here

function shib_auth_goto_custom_form in Shibboleth Authentication 7.4

Same name and namespace in other branches
  1. 6.4 shib_auth.module \shib_auth_goto_custom_form()

User Data Customization function - Redirect user to the custom form.

This function redirects user to the custom data form, remembering the URL, she wanted to visit before registering or a specific login URL, if it is set.

1 call to shib_auth_goto_custom_form()
shib_auth_custom_form in ./shib_auth.module
Displays custom form if either customization or consent options are enabled.

File

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

Code

function shib_auth_goto_custom_form() {
  if ($_GET['q'] != 'shib_auth/get_custom_data' && $_GET['q'] != 'shib_link') {
    $_SESSION['shib_auth_custom_form'] = TRUE;
    if (shib_auth_config('login_url') == '') {
      $_SESSION['shib_auth_custom_form_url'] = $_GET['q'];
    }
    else {
      $_SESSION['shib_auth_custom_form_url'] = shib_auth_config('login_url');
    }
    drupal_goto('shib_auth/get_custom_data');
  }
}