We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95cfec2 commit f88dd2dCopy full SHA for f88dd2d
phpslim-api/homedocs/Middleware/JWT.php
@@ -36,7 +36,7 @@ public function __invoke(\Psr\Http\Message\ServerRequestInterface $request, \Psr
36
if (isset($decoded) && isset($decoded->data) && isset($decoded->data->userId) && isset($decoded->data->email)) {
37
$this->logger->notice("JWT valid data decoded", [print_r($decoded->data, true)]);
38
$user = new \HomeDocs\User($decoded->data->userId);
39
- if (!$user->exists($this->dbh)) {
+ if ($user->exists($this->dbh)) {
40
\HomeDocs\UserSession::set($decoded->data->userId, $decoded->data->email);
41
} else {
42
throw new \HomeDocs\Exception\NotFoundException("userId");
0 commit comments