function login_destination_form_alter in Login Destination 5
Same name and namespace in other branches
- 7 login_destination.module \login_destination_form_alter()
Implementation of hook_form_alter().
File
- ./
login_destination.module, line 20 - Controls which URL users will be redirected upon login.
Code
function login_destination_form_alter($form_id, &$form) {
if (($form_id == 'user_login_block' || $form_id == 'user_login') && login_destination_apply_redirect()) {
$_SESSION['login_page'] = $_GET['q'];
$form['#action'] = login_destination_get_destination();
}
}