Permalink
Browse files

CAS authentication: MDL-19671 phpCAS::getUser can return a mixed-case…

… username, so lower-case it for comparison.

Merged from MOODLE_18_STABLE
  • Loading branch information...
iarenaza
iarenaza committed Jun 30, 2009
1 parent 6a1f28e commit 2ecb5ae3898a146024b6869863cf5173ffaa191c
Showing with 1 addition and 1 deletion.
  1. +1 −1 auth/cas/auth.php
View
@@ -58,7 +58,7 @@ function auth_plugin_cas() {
*/
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'.

0 comments on commit 2ecb5ae

Please sign in to comment.