Merge branch 'MDL-65926-master_lowercase_username_sql_query' of https://github.com/andrewmadden/moodle
This commit is contained in:
+6
-1
@@ -4826,7 +4826,12 @@ function get_complete_user_data($field, $value, $mnethostid = null, $throwexcept
|
||||
$field = core_text::strtolower($field);
|
||||
|
||||
// List of case insensitive fields.
|
||||
$caseinsensitivefields = ['username', 'email'];
|
||||
$caseinsensitivefields = ['email'];
|
||||
|
||||
// Username input is forced to lowercase and should be case sensitive.
|
||||
if ($field == 'username') {
|
||||
$value = core_text::strtolower($value);
|
||||
}
|
||||
|
||||
// Build the WHERE clause for an SQL query.
|
||||
$params = array('fieldval' => $value);
|
||||
|
||||
Reference in New Issue
Block a user