http header OCS-ApiRequest: true is required in case of session based OCS API calls
This commit is contained in:
parent
de57e36b6b
commit
3d42e402c5
|
@ -250,7 +250,8 @@ class OC_API {
|
||||||
|
|
||||||
// reuse existing login
|
// reuse existing login
|
||||||
$loggedIn = OC_User::isLoggedIn();
|
$loggedIn = OC_User::isLoggedIn();
|
||||||
if ($loggedIn === true) {
|
$ocsApiRequest = isset($_SERVER['OCS_APIREQUEST']) ? $_SERVER['OCS_APIREQUEST'] === 'true' : false;
|
||||||
|
if ($loggedIn === true && $ocsApiRequest) {
|
||||||
return OC_User::getUser();
|
return OC_User::getUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue