aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarvin Borner2018-08-17 18:43:14 +0200
committerMarvin Borner2018-08-17 18:43:14 +0200
commit83d9936c586e6c5d8d464b7ae56da318268fa0b9 (patch)
tree2e7b6da3b18649f54d038150daecf09acd61dc38
parenta5994661adb85264eca6d12e851a88637782c155 (diff)
Added user_id to login answer
-rw-r--r--infrastructure/Auth/LoginProxy.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/infrastructure/Auth/LoginProxy.php b/infrastructure/Auth/LoginProxy.php
index f214c23..c245e52 100644
--- a/infrastructure/Auth/LoginProxy.php
+++ b/infrastructure/Auth/LoginProxy.php
@@ -44,12 +44,14 @@ class LoginProxy
$user = $this->userRepository->getWhere('email', $email)->first();
if (!is_null($user)) {
- return $this->proxy('password', [
+ $TokenObject = $this->proxy('password', [
'username' => $email,
'password' => $password
]);
+ return array_merge($TokenObject, ['user_id' => $user->id]);
}
+
throw new InvalidCredentialsException();
}