- WIP on securing PostRequestAuth and began adding some LAN auth also
This commit is contained in:
1 parent
d149e0a741
commit
45546fbcc0
4 files changed
+107
-5
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user