Permalink
Browse files

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

… username, so lower-case it for comparison.
  • Loading branch information...
1 parent 8f60039 commit 352032b81f22431c0ffb424c9d85df447d7dfae0 iarenaza committed Jun 30, 2009
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 352032b

Please sign in to comment.