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

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