Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed bug in handler for token sessions

  • Loading branch information...
commit 233ac8ae017e61e27004aec174a3e2d384d78484 1 parent 6d6b5f4
Jack Lawson ajacksified authored

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. +4 3 core/Router/Handler.class.php
7 core/Router/Handler.class.php
@@ -22,13 +22,13 @@ public function PreRequest()
22 22 {
23 23 $session = \Classes\SessionHandler::getSession();
24 24
25   - if(!array_key_exists(\Models\Session::FIELD_USER, $session->Data) && array_key_exists("token", $this->_request)){
  25 + if(!array_key_exists(\Models\Session::FIELD_USER, $session->Data) && array_key_exists("_token", $this->_request)){
26 26 $user = \Controllers\Users::GetByToken(trim($this->_request['_token']),trim($this->_request['_userid']));
27 27
28 28 if($user !== null)
29 29 {
30   - $user->LoggedIn = true;
31   - $session->Data[\Models\Session::FIELD_USER] = $user;
  30 + $user->Password = null;
  31 + $session->Data[\Models\Session::FIELD_USER] = (array)$user;
32 32 }
33 33 }
34 34 }
@@ -63,3 +63,4 @@ protected function setHTTPStatusCode($code)
63 63 }
64 64 }
65 65 ?>
  66 +

0 comments on commit 233ac8a

Please sign in to comment.
Something went wrong with that request. Please try again.