You are here

function _cas_external_user_is_blocked in CAS 7

Same name and namespace in other branches
  1. 5.4 cas.module \_cas_external_user_is_blocked()
  2. 5.3 cas.module \_cas_external_user_is_blocked()
  3. 6.3 cas.module \_cas_external_user_is_blocked()
  4. 6.2 cas.module \_cas_external_user_is_blocked()

Determine whether a CAS user is blocked.

Parameters

$cas_name: The CAS username.

Return value

Boolean TRUE if the user is blocked, FALSE if the user is active.

1 call to _cas_external_user_is_blocked()
cas_login_check in ./cas.module
Checks to see if the user needs to be logged in.

File

./cas.module, line 1213
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_external_user_is_blocked($cas_name) {
  return db_query("SELECT name FROM {users} u JOIN {cas_user} c ON u.uid = c.uid WHERE u.status = 0 AND c.cas_name = :cas_name", array(
    ':cas_name' => $cas_name,
  ))
    ->fetchField();
}