Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-29035-m21' of git://github.com/ankitagarwal/moodle …

…into MOODLE_21_STABLE
  • Loading branch information...
commit cd6ac6c8b8a5891deb53cfc1c861d057d0949019 2 parents 3a2fc59 + 6b67218
@stronk7 stronk7 authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 backup/util/dbops/restore_dbops.class.php
View
14 backup/util/dbops/restore_dbops.class.php
@@ -951,7 +951,7 @@ protected static function precheck_user($user, $samesite) {
AND mnethostid = ?
AND deleted = 1
AND (
- username LIKE ?
+ UPPER(username) LIKE UPPER(?)
OR (
".$DB->sql_isnotempty('user', 'email', false, false)."
AND email = ?
@@ -973,7 +973,7 @@ protected static function precheck_user($user, $samesite) {
FROM {user} u
WHERE id = ?
AND mnethostid = ?
- AND email = ?",
+ AND UPPER(email) = UPPER(?)",
array($user->id, $user->mnethostid, $trimemail))) {
return $rec; // Matching user, deleted in backup file found, return it
}
@@ -996,7 +996,7 @@ protected static function precheck_user($user, $samesite) {
WHERE username = ?
AND mnethostid = ?
AND (
- email = ?
+ UPPER(email) = UPPER(?)
OR (
firstaccess != 0
AND firstaccess = ?
@@ -1020,7 +1020,7 @@ protected static function precheck_user($user, $samesite) {
AND ".$DB->sql_isnotempty('user', 'email', false, false)."
AND email = ?
AND (
- username LIKE ?
+ UPPER(username) LIKE UPPER(?)
OR (
firstaccess != 0
AND firstaccess = ?
@@ -1038,7 +1038,7 @@ protected static function precheck_user($user, $samesite) {
FROM {user} u
WHERE mnethostid = ?
AND deleted = 1
- AND username LIKE ?
+ AND UPPER(username) LIKE UPPER(?)
AND firstaccess != 0
AND firstaccess = ?",
array($user->mnethostid, $user->email.'.%', $user->firstaccess))) {
@@ -1056,7 +1056,7 @@ protected static function precheck_user($user, $samesite) {
if ($rec = $DB->get_record_sql("SELECT *
FROM {user} u
WHERE mnethostid = ?
- AND email = ?
+ AND UPPER(email) = UPPER(?)
AND firstaccess != 0
AND firstaccess = ?",
array($user->mnethostid, $trimemail, $user->firstaccess))) {
@@ -1070,7 +1070,7 @@ protected static function precheck_user($user, $samesite) {
WHERE username = ?
AND mnethostid = ?
AND NOT (
- email = ?
+ UPPER(email) = UPPER(?)
OR (
firstaccess != 0
AND firstaccess = ?
Please sign in to comment.
Something went wrong with that request. Please try again.