Commit 17211abf authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1567100: In Mahara we deal with username in a case insensitive way

In other places we check the LOWER(username) but for some reason
in find_by_username() we don't. We should do it here as well for


Change-Id: Ie692aeace0c8aa2f6989683e094ac6625f153b98
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit fb330e38)
parent 0d92a07a
......@@ -134,6 +134,7 @@ class User {
throw new InvalidArgumentException('username parameter must be a string to create a User object');
$username = strtolower($username);
$sql = 'SELECT
' . db_format_tsfield('expiry') . ',
......@@ -145,7 +146,7 @@ class User {
username = ?';
LOWER(username) = ?';
$user = get_record_sql($sql, array($username));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment