mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Refactor findNull to find
This commit is contained in:
@@ -49,7 +49,7 @@ class APIEventHandler
|
||||
{
|
||||
/** @var UserRepositoryInterface $repository */
|
||||
$repository = app(UserRepositoryInterface::class);
|
||||
$user = $repository->findNull((int)$event->userId);
|
||||
$user = $repository->find((int)$event->userId);
|
||||
if (null !== $user) {
|
||||
$email = $user->email;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class AutomationHandler
|
||||
Log::debug('In reportJournals.');
|
||||
/** @var UserRepositoryInterface $repository */
|
||||
$repository = app(UserRepositoryInterface::class);
|
||||
$user = $repository->findNull($event->userId);
|
||||
$user = $repository->find($event->userId);
|
||||
if (null !== $user && 0 !== $event->groups->count()) {
|
||||
|
||||
$email = $user->email;
|
||||
|
||||
Reference in New Issue
Block a user