浏览代码

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"
Hervé Yvis 4 年之前
父节点
当前提交
37cddf740c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Console/Commands/FixUsernames.php

+ 1 - 1
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);