From 37cddf740c77fa663446d6e2eba318efd269364b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Yvis?= <31569002+yvisherve@users.noreply.github.com> Date: Thu, 26 Nov 2020 18:30:40 +0100 Subject: [PATCH] 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" --- app/Console/Commands/FixUsernames.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/FixUsernames.php b/app/Console/Commands/FixUsernames.php index 5269c8469..96dcd9cc6 100644 --- a/app/Console/Commands/FixUsernames.php +++ b/app/Console/Commands/FixUsernames.php @@ -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);