function ajax_logintoboggan_ajax_alter in Ajax 6
Handles a special case for Login Toboggan redirection
Parameters
$form Assoc:
Return value
Bool
File
- plugins/
loggintoboggan/ ajax_logintoboggan.module, line 31
Code
function ajax_logintoboggan_ajax_alter(&$form, &$form_state, $form_id) {
global $logintoboggan_denied;
if (isset($logintoboggan_denied) && $logintoboggan_denied) {
$q = ajax_path_info($form['#action']);
if (!array_key_exists('destination', $q['query'])) {
$p = ajax_drupal_path($form['#action']);
$q['query']['destination'] = $p;
$form['#action'] = url($p, array(
'query' => $q['query'],
'fragment' => $q['fragment'],
'absolute' => FALSE,
));
}
}
else {
return FALSE;
}
}