Skip to content
Snippets Groups Projects
Commit 3d42e402 authored by Thomas Müller's avatar Thomas Müller
Browse files

http header OCS-ApiRequest: true is required in case of session based OCS API calls

parent de57e36b
Branches
No related tags found
No related merge requests found
......@@ -250,7 +250,8 @@ class OC_API {
// reuse existing login
$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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment