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 2020-11-26 18:30:40 +01:00 zatwierdzone przez GitHub
rodzic 78a8798ace
commit 37cddf740c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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