Merge pull request #1819 from pixelfed/staging

Update FixUsernames command, skip admin and deleted users
This commit is contained in:
daniel 2019-11-13 23:30:53 -07:00 committed by GitHub
commit 95baffaa4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}