You are here

function cas_is_external_user in CAS 6.3

Same name and namespace in other branches
  1. 7 cas.module \cas_is_external_user()

Determine whether the specified user is an "external" CAS user. When settings are set to use drupal as the user repository, then this function will always return true.

Parameters

$account: The user object for the user to query. If omitted, the current user is used.

Return value

TRUE if the user is logged in via CAS.

1 call to cas_is_external_user()
cas_form_alter in ./cas.module
Implementation of hook_form_alter().

File

./cas.module, line 1082
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_is_external_user($account = NULL) {
  if (!isset($account)) {
    $account = $GLOBALS['user'];
  }
  return in_array(cas_current_user(), $account->cas_names);
}