function openid_connect_save_destination in OpenID Connect / OAuth client 7
Same name and namespace in other branches
- 8 openid_connect.module \openid_connect_save_destination()
Save the current path in the session, for redirecting after authorization.
2 calls to openid_connect_save_destination()
- openid_connect_connect_form_submit in includes/
openid_connect.forms.inc - Submit callback for the connect account form.
- openid_connect_login_form_submit in includes/
openid_connect.forms.inc - Form submit handler: Log in with an OpenID Connect login provider.
File
- ./
openid_connect.module, line 341 - A pluggable client implementation for the OpenID Connect protocol.
Code
function openid_connect_save_destination() {
$destination = drupal_get_destination();
$destination = $destination['destination'] == 'user/login' ? 'user' : $destination['destination'];
// The destination could contain query parameters. Ensure that they are
// preserved.
$parsed = drupal_parse_url($destination);
$_SESSION['openid_connect_destination'] = array(
$parsed['path'],
array(
'query' => $parsed['query'],
),
);
}