You are here

function cas_login_validate in CAS 6.3

Same name and namespace in other branches
  1. 6.2 cas.module \cas_login_validate()

Login form _validate hook

1 string reference to 'cas_login_validate'
cas_form_alter in ./cas.module
Implementation of hook_form_alter().

File

./cas.module, line 1004
Enables users to authenticate via a Central Authentication Service (CAS) Cas will currently work if the auto registration is turned on and will create user accounts automatically.

Code

function cas_login_validate($form, &$form_state) {
  if (!empty($form_state['values']['persistent_login'])) {
    $_SESSION['cas_remember'] = 1;
  }

  // Force redirection.
  unset($_REQUEST['destination']);
  drupal_goto('cas', $form_state['values']['cas.return_to']);
}