admin/uploaduser fixups - lowercase oldusername and fix missing strings
This commit is contained in:
@@ -229,9 +229,10 @@
|
||||
// before insert/update, check whether we should be updating
|
||||
// an old record instead
|
||||
if ($allowrenames && !empty($user->oldusername) ) {
|
||||
$user->oldusername = moodle_strtolower($user->oldusername);
|
||||
if ($olduser = get_record('user','username',$user->oldusername)) {
|
||||
if (set_field('user', 'username', $user->username, 'username', $user->oldusername)) {
|
||||
notify(get_string('userrenamed') . " : $user->oldusername $user->username");
|
||||
notify(get_string('userrenamed', 'admin') . " : $user->oldusername $user->username");
|
||||
$renames++;
|
||||
} else {
|
||||
notify(get_string('usernotrenamedexists', 'error') . " : $user->oldusername $user->username");
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ $string['upgradesure'] = 'Your Moodle files have been changed, and you are about
|
||||
$string['upgradingdata'] = 'Upgrading data';
|
||||
$string['upgradinglogs'] = 'Upgrading logs';
|
||||
$string['userrenamed'] = 'User renamed';
|
||||
$string['userupdated'] = 'User updated';
|
||||
$string['useraccountupdated'] = 'User updated';
|
||||
$string['userscreated'] = 'Users created';
|
||||
$string['usersrenamed'] = 'Users renamed';
|
||||
$string['usersupdated'] = 'Users updated';
|
||||
|
||||
Reference in New Issue
Block a user