- WIP on securing PostRequestAuth and began adding some LAN auth also

This commit is contained in:
mcndave committed 2026-07-01 14:29:45 -04:00
1 parent d149e0a741
commit 45546fbcc0
4 files changed
+107 -5

No files matched your search

+9 -5
View File
@@ -120,15 +120,19 @@ class Authenticate {
return $this;
}
public function logUser(?int $id) : ? UserInterface
public function logUser(null|int|object $id) : ? UserInterface
{
try {
if ($id === null || null === ($entity = $this->user::repository()->loadFromPk($id))) {
if (! is_object($id)) {
try {
if ($id === null || null === ($entity = $this->user::repository()->loadFromPk($id))) {
return null;
}
} catch (\Exception $ex) {
return null;
}
}
catch(\Exception $ex) {
return null;
else {
$entity = $id;
}
$this->user->fromArray($entity);