- WIP on header-based authentication
This commit is contained in:
1 parent
ad802fc35d
commit
944c524cfb
8 files changed
+143
-1
No files matched your search
@@ -37,7 +37,7 @@ class Authenticate {
|
||||
{
|
||||
$logUser = function(? int $id) use ($repository) {
|
||||
if ( $id === null || null === ( $user = $repository->loadFromPk($id) ) ) {
|
||||
throw new \Exception("User not found.");
|
||||
throw new \InvalidArgumentException(sprintf("User having id '%s' was not found.", $id));
|
||||
}
|
||||
|
||||
$user->logged = true;
|
||||
|
||||
Reference in new issue
Block a user