mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Expanded test coverage.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Repositories\User;
|
||||
|
||||
@@ -66,6 +66,23 @@ class UserRepository implements UserRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param bool $isBlocked
|
||||
* @param string $code
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function changeStatus(User $user, bool $isBlocked, string $code): bool
|
||||
{
|
||||
// change blocked status and code:
|
||||
$user->blocked = $isBlocked;
|
||||
$user->blocked_code = $code;
|
||||
$user->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user