mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 16:00:13 +00:00
Fix #4195
This commit is contained in:
@@ -34,7 +34,7 @@ use Log;
|
|||||||
class UserTransformer extends AbstractTransformer
|
class UserTransformer extends AbstractTransformer
|
||||||
{
|
{
|
||||||
/** @var UserRepositoryInterface */
|
/** @var UserRepositoryInterface */
|
||||||
private $repository;
|
private UserRepositoryInterface $repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform user.
|
* Transform user.
|
||||||
@@ -45,6 +45,7 @@ class UserTransformer extends AbstractTransformer
|
|||||||
*/
|
*/
|
||||||
public function transform(User $user): array
|
public function transform(User $user): array
|
||||||
{
|
{
|
||||||
|
$this->repository = $this->repository ?? app(UserRepositoryInterface::class);
|
||||||
return [
|
return [
|
||||||
'id' => (int)$user->id,
|
'id' => (int)$user->id,
|
||||||
'created_at' => $user->created_at->toAtomString(),
|
'created_at' => $user->created_at->toAtomString(),
|
||||||
|
Reference in New Issue
Block a user