CAS authentication: MDL-19671 phpCAS::getUser can return a mixed-case username, so lower-case it for comparison.

Merged from MOODLE_18_STABLE
This commit is contained in:
iarenaza 2009-06-30 23:33:11 +00:00
parent adf8f3f9ad
commit afacbf004a

View 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'.