diff --git a/auth/ldap/lib.php b/auth/ldap/lib.php index 39bd042720f..563e8ad029d 100644 --- a/auth/ldap/lib.php +++ b/auth/ldap/lib.php @@ -52,7 +52,7 @@ function auth_user_login ($username, $password) { } // CAS-supplied auth tokens override LDAP auth - if (AUTH_LDAP_NAME === 'cas' && $CFG->use_cas == 1) { + if ($CFG->auth == "cas" && !empty($CFG->cas_enabled)) { return cas_ldap_auth_user_login($username, $password); }