- WIP on header-based authentication

This commit is contained in:
mcndave committed 2023-11-03 08:26:48 -04:00
1 parent ad802fc35d
commit 944c524cfb
8 files changed
+143 -1

No files matched your search

+1 -1
View File
@@ -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;