Update FixUsernames.php

Should allow to fix registered usernames that are are restricted, even if they are in a different case.

Examples : "ADmiN" , "Logout", "Help", "FollowMe"
pull/2457/head
Hervé Yvis 4 years ago committed by GitHub
parent 78a8798ace
commit 37cddf740c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,7 +57,7 @@ class FixUsernames extends Command
if($user->is_admin || $user->status == 'deleted') { if($user->is_admin || $user->status == 'deleted') {
continue; continue;
} }
if(in_array($user->username, $restricted)) { if(in_array(strtolower($user->username), array_map('strtolower', $restricted))) {
$affected->push($user); $affected->push($user);
} }
$val = str_replace(['-', '_', '.'], '', $user->username); $val = str_replace(['-', '_', '.'], '', $user->username);

Loading…
Cancel
Save