Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed bug in handler for token sessions

  • Loading branch information...
commit 233ac8ae017e61e27004aec174a3e2d384d78484 1 parent 6d6b5f4
Jack Lawson ajacksified authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 core/Router/Handler.class.php
7 core/Router/Handler.class.php
View
@@ -22,13 +22,13 @@ public function PreRequest()
{
$session = \Classes\SessionHandler::getSession();
- if(!array_key_exists(\Models\Session::FIELD_USER, $session->Data) && array_key_exists("token", $this->_request)){
+ if(!array_key_exists(\Models\Session::FIELD_USER, $session->Data) && array_key_exists("_token", $this->_request)){
$user = \Controllers\Users::GetByToken(trim($this->_request['_token']),trim($this->_request['_userid']));
if($user !== null)
{
- $user->LoggedIn = true;
- $session->Data[\Models\Session::FIELD_USER] = $user;
+ $user->Password = null;
+ $session->Data[\Models\Session::FIELD_USER] = (array)$user;
}
}
}
@@ -63,3 +63,4 @@ protected function setHTTPStatusCode($code)
}
}
?>
+
Please sign in to comment.
Something went wrong with that request. Please try again.