mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #1819 from pixelfed/staging
Update FixUsernames command, skip admin and deleted users
This commit is contained in:
commit
95baffaa4b
|
@ -48,6 +48,9 @@ class FixUsernames extends Command
|
||||||
|
|
||||||
$users = User::chunk(100, function($users) use($affected, $restricted) {
|
$users = User::chunk(100, function($users) use($affected, $restricted) {
|
||||||
foreach($users as $user) {
|
foreach($users as $user) {
|
||||||
|
if($user->is_admin || $user->status == 'deleted') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(in_array($user->username, $restricted)) {
|
if(in_array($user->username, $restricted)) {
|
||||||
$affected->push($user);
|
$affected->push($user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue