From: iarenaza Date: Tue, 30 Jun 2009 23:33:11 +0000 (+0000) Subject: CAS authentication: MDL-19671 phpCAS::getUser can return a mixed-case username, so... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=afacbf004aaee146bef9a7b34d4cad4fc2fa994a;p=moodle.git CAS authentication: MDL-19671 phpCAS::getUser can return a mixed-case username, so lower-case it for comparison. Merged from MOODLE_18_STABLE --- diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 919e84bfae..b85fc861d6 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -59,7 +59,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'.