Update repository base code to be cleaner and make use of PHP 7 features
This commit is contained in:
parent
0ec5a4e08c
commit
60eb60013c
96 changed files with 1048 additions and 1785 deletions
|
@ -61,7 +61,7 @@ class DeleteUserCommand extends Command
|
|||
$search = $this->option('user') ?? $this->ask(trans('command/messages.user.search_users'));
|
||||
Assert::notEmpty($search, 'Search term must be a non-null value, received %s.');
|
||||
|
||||
$results = $this->repository->search($search)->all();
|
||||
$results = $this->repository->setSearchTerm($search)->all();
|
||||
if (count($results) < 1) {
|
||||
$this->error(trans('command/messages.user.no_users_found'));
|
||||
if ($this->input->isInteractive()) {
|
||||
|
|
|
@ -54,7 +54,7 @@ class DisableTwoFactorCommand extends Command
|
|||
}
|
||||
|
||||
$email = $this->option('email') ?? $this->ask(trans('command/messages.user.ask_email'));
|
||||
$user = $this->repository->withColumns(['id', 'email'])->findFirstWhere([['email', '=', $email]]);
|
||||
$user = $this->repository->setColumns(['id', 'email'])->findFirstWhere([['email', '=', $email]]);
|
||||
|
||||
$this->repository->withoutFresh()->update($user->id, [
|
||||
'use_totp' => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue