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 1/2] 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); From 9d1499eeb914f7ad9faa6f614c3e0bb90de702d0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 27 Nov 2020 14:22:05 -0700 Subject: [PATCH 2/2] Update Place model, add name method --- app/Place.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Place.php b/app/Place.php index 5ea6351cc..c1409838e 100644 --- a/app/Place.php +++ b/app/Place.php @@ -40,4 +40,9 @@ class Place extends Model { return $this->url(); } + + public function getName() + { + return $this->name . ', ' . $this->country; + } }