mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
add bulk confirm
This commit is contained in:
@@ -483,4 +483,18 @@ class UserRepository extends BaseRepository
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function confirmUser($id): bool
|
||||
{
|
||||
$update = [
|
||||
'status' => User::STATUS_CONFIRMED,
|
||||
'editsecret' => '',
|
||||
];
|
||||
User::query()
|
||||
->whereIn('id', Arr::wrap($id))
|
||||
->where('status', User::STATUS_PENDING)
|
||||
->update($update);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user