Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Olivine-Labs/Mint
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianGray committed Jan 31, 2012
2 parents 4b86107 + 56cb6fd commit 6e4201c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/Router/Handler.class.php
Expand Up @@ -22,13 +22,13 @@ public function PreRequest()
{ {
$session = \Classes\SessionHandler::getSession(); $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'])); $user = \Controllers\Users::GetByToken(trim($this->_request['_token']),trim($this->_request['_userid']));


if($user !== null) if($user !== null)
{ {
$user->LoggedIn = true; $user->Password = null;
$session->Data[\Models\Session::FIELD_USER] = $user; $session->Data[\Models\Session::FIELD_USER] = (array)$user;
} }
} }
} }
Expand Down Expand Up @@ -63,3 +63,4 @@ protected function setHTTPStatusCode($code)
} }
} }
?> ?>

0 comments on commit 6e4201c

Please sign in to comment.