Merge branch 'MDL-65926-master_lowercase_username_sql_query' of https://github.com/andrewmadden/moodle

This commit is contained in:
Jun Pataleta
2019-07-11 20:57:29 +02:00
committed by Eloy Lafuente (stronk7)
+6 -1
View File
@@ -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);