1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Update FixUsernames command, skip admin and deleted users

This commit is contained in:
Daniel Supernault 2019-11-13 23:30:02 -07:00
parent 0cfe0da1df
commit 6583957dc8
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

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