Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Victor Saisa Lopez
2014-06-23 12:45:21 -04:00

View File

@@ -199,7 +199,7 @@ class Server implements iAuthenticate
$request = \OAuth2\Request::createFromGlobals(); $request = \OAuth2\Request::createFromGlobals();
$allowed = $this->server->verifyResourceRequest($request); $allowed = $this->server->verifyResourceRequest($request);
$token = $this->server->getAccessTokenData($request); $token = $this->server->getAccessTokenData($request);
self::$userId = $token['user_id'];
// Session handling to prevent session lose in other places like, home, admin, etc // Session handling to prevent session lose in other places like, home, admin, etc
// when user is using the new designer that have not session because it is using only the API // when user is using the new designer that have not session because it is using only the API
@@ -208,7 +208,7 @@ class Server implements iAuthenticate
$pmAccessToken = new \PmoauthUserAccessTokens(); $pmAccessToken = new \PmoauthUserAccessTokens();
$session = $pmAccessToken->getSessionData($token['ACCESS_TOKEN']); $session = $pmAccessToken->getSessionData($token['ACCESS_TOKEN']);
if ($session !== false) { if ($session !== false && array_key_exists($session->getSessionId(), $_COOKIE)) {
// increase the timeout for local php session cookie // increase the timeout for local php session cookie
$config = \Bootstrap::getSystemConfiguration(); $config = \Bootstrap::getSystemConfiguration();