diff --git a/app/Console/Commands/FixUsernames.php b/app/Console/Commands/FixUsernames.php index a9333828..5ba49a6a 100644 --- a/app/Console/Commands/FixUsernames.php +++ b/app/Console/Commands/FixUsernames.php @@ -48,6 +48,9 @@ class FixUsernames extends Command $users = User::chunk(100, function($users) use($affected, $restricted) { foreach($users as $user) { + if($user->is_admin || $user->status == 'deleted') { + continue; + } if(in_array($user->username, $restricted)) { $affected->push($user); }