From 2ecb5ae3898a146024b6869863cf5173ffaa191c Mon Sep 17 00:00:00 2001 From: iarenaza Date: Tue, 30 Jun 2009 23:32:42 +0000 Subject: [PATCH] CAS authentication: MDL-19671 phpCAS::getUser can return a mixed-case username, so lower-case it for comparison. Merged from MOODLE_18_STABLE --- auth/cas/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/cas/auth.php b/auth/cas/auth.php index ee9610abf85..ee3e72a675f 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -58,7 +58,7 @@ class auth_plugin_cas extends auth_plugin_base { */ function user_login ($username, $password) { $this->connectCAS(); - return phpCAS::isAuthenticated() && (phpCAS::getUser() == $username); + return phpCAS::isAuthenticated() && (trim(moodle_strtolower(phpCAS::getUser())) == $username); } /** * Returns true if this authentication plugin is 'internal'.