Merged in bugfix/PMCORE-3422 (pull request #8262)
PMCORE-3422 Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -346,7 +346,7 @@ class Server implements iAuthenticate
|
||||
$request = \OAuth2\Request::createFromGlobals();
|
||||
$allowed = $this->server->verifyResourceRequest($request);
|
||||
$token = $this->server->getAccessTokenData($request);
|
||||
self::$userId = $token['user_id'];
|
||||
self::$userId = !empty($token['user_id']) ? $token['user_id'] : '';
|
||||
// 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
|
||||
|
||||
@@ -392,7 +392,7 @@ class Server implements iAuthenticate
|
||||
->setSkin(SYS_SKIN)
|
||||
->setLanguage(SYS_LANG);
|
||||
|
||||
if ($token['client_id'] === config('oauthClients.mobile.clientId')) {
|
||||
if (!empty($token['client_id']) && $token['client_id'] === config('oauthClients.mobile.clientId')) {
|
||||
ChangeLog::getChangeLog()
|
||||
->setSourceId(ChangeLog::FromMobile);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user