fixing ident

This commit is contained in:
Thomas Müller 2014-03-07 20:06:06 +01:00
parent 0d90b90d94
commit 25f523680a
1 changed files with 9 additions and 9 deletions

View File

@ -271,18 +271,18 @@ class OC_API {
*/ */
private static function loginUser(){ private static function loginUser(){
// reuse existing login // reuse existing login
$loggedIn = OC_User::isLoggedIn(); $loggedIn = OC_User::isLoggedIn();
$ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false;
if ($loggedIn === true && $ocsApiRequest) { if ($loggedIn === true && $ocsApiRequest) {
// initialize the user's filesystem // initialize the user's filesystem
\OC_Util::setUpFS(\OC_User::getUser()); \OC_Util::setUpFS(\OC_User::getUser());
return OC_User::getUser(); return OC_User::getUser();
} }
// basic auth // basic auth
$authUser = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : ''; $authUser = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : '';
$authPw = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; $authPw = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';
$return = OC_User::login($authUser, $authPw); $return = OC_User::login($authUser, $authPw);