mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
This code fixes #349
This commit is contained in:
@@ -59,6 +59,21 @@ class UserRepository implements UserRepositoryInterface
|
||||
return $this->all()->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $userId
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function find(int $userId): User
|
||||
{
|
||||
$user = User::find($userId);
|
||||
if (!is_null($user)) {
|
||||
return $user;
|
||||
}
|
||||
|
||||
return new User;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return basic user information.
|
||||
*
|
||||
|
Reference in New Issue
Block a user