You are here

function cas_login_destination in CAS 6.3

Helper function to rewrite the destination to avoid redirecting to login page after login.

Instead of the login page, we redirect to the front page.

3 calls to cas_login_destination()
cas_form_alter in ./cas.module
Implementation of hook_form_alter().
cas_login_block in ./cas.module
Login form for the CAS login block.
cas_phpcas_init in ./cas.module
Initialize phpCAS.

File

./cas.module, line 413
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_destination() {

  // Equivalent to user_login_destination(), which appeared first in Drupal 6.19.
  $destination = drupal_get_destination();
  $destination = $destination == 'destination=user%2Flogin' ? 'destination=user' : $destination;
  return $destination == 'destination=cas' ? 'destination=' : $destination;
}