You are here

function cas_login_submit in CAS 7

Login form _validate hook

1 string reference to 'cas_login_submit'
cas_form_alter in ./cas.module
Implements hook_form_alter().

File

./cas.module, line 1102
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_submit(&$form, &$form_state) {
  if (!empty($form_state['values']['persistent_login'])) {
    $_SESSION['cas_remember'] = 1;
  }

  // Force redirection.
  unset($_GET['destination']);
  drupal_goto('cas', array(
    'query' => $form_state['values']['cas.return_to'],
  ));
}