function _logintoboggan_process_redirect in LoginToboggan 7
Same name and namespace in other branches
- 5 logintoboggan.module \_logintoboggan_process_redirect()
- 6 logintoboggan.module \_logintoboggan_process_redirect()
Transforms a URL fragment into a redirect array understood by drupal_goto().
Parameters
$redirect: The redirect string.
$account: The user account object associated with the redirect.
2 calls to _logintoboggan_process_redirect()
- logintoboggan_user_register_submit in ./
logintoboggan.module - Custom submit function for user registration form
- logintoboggan_validate_email in ./
logintoboggan.validation.inc - @file Validation functions for LoginToboggan module.
File
- ./
logintoboggan.module, line 1134 - LoginToboggan module
Code
function _logintoboggan_process_redirect($redirect, $account) {
$variables = array(
'%uid' => $account->uid,
);
$redirect = drupal_parse_url(urldecode(strtr($redirect, $variables)));
// If there's a path set, override the destination parameter if necessary.
if ($redirect['path'] && variable_get('logintoboggan_override_destination_parameter', 1)) {
unset($_GET['destination']);
}
return array(
$redirect['path'],
array(
'query' => $redirect['query'],
'fragment' => $redirect['fragment'],
),
);
}