mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fixed a lot of tests and associated code.
This commit is contained in:
@@ -223,6 +223,18 @@ class UserRepository implements UserRepositoryInterface
|
||||
return $user->hasRole($role);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
public function unblockUser(User $user): void
|
||||
{
|
||||
$user->blocked = 0;
|
||||
$user->blocked_code = '';
|
||||
$user->save();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This updates the users email address. Same as changeEmail just without most logging. This makes sure that the undo/confirm routine can't catch this one.
|
||||
* The user is NOT blocked.
|
||||
|
@@ -122,6 +122,11 @@ interface UserRepositoryInterface
|
||||
*/
|
||||
public function hasRole(User $user, string $role): bool;
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*/
|
||||
public function unblockUser(User $user): void;
|
||||
|
||||
/**
|
||||
* This updates the users email address. Same as changeEmail just without most logging. This makes sure that the undo/confirm routine can't catch this one.
|
||||
* The user is NOT blocked.
|
||||
|
Reference in New Issue
Block a user