Fixed incorrect syntax (trying to use an object as an associative array)

This commit is contained in:
djpbessems 2019-01-28 13:47:37 +01:00
parent 0c8b672b41
commit ac5f509d4e

View File

@ -101,7 +101,7 @@ function validateToken (string $secureToken) {
}
if (!empty($storedTokens) && sizeof(array_filter($storedTokens, function ($value) use ($jwtPayload) {
return $value['iat'] === $jwtPayload['iat'];
return $value->iat === $jwtPayload->iat;
})) === 1) {
// At least one of the database-stored tokens match
return ['status' => 'Success', 'token' => $jwtPayload];