]> git.mjollnir.org Git - moodle.git/commitdiff
CAS authentication: MDL-19671 phpCAS::getUser can return a mixed-case username, so...
authoriarenaza <iarenaza>
Tue, 30 Jun 2009 23:33:11 +0000 (23:33 +0000)
committeriarenaza <iarenaza>
Tue, 30 Jun 2009 23:33:11 +0000 (23:33 +0000)
Merged from MOODLE_18_STABLE

auth/cas/auth.php

index 919e84bfae452227dfa1596e0c109dc013415932..b85fc861d6f1011ee45d4a821b699462af64a0a2 100644 (file)
@@ -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'.