diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-07 20:06:06 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-07 20:06:06 +0100 |
commit | 25f523680ac1ed46470ea40277e578fd35ec02a7 (patch) | |
tree | 2bcbcb8da76ee84f02d56e6a827bbbb697a9cc47 /lib/private/api.php | |
parent | 0d90b90d9402cbcab4037efc913728cdeb4eadbd (diff) | |
download | nextcloud-server-25f523680ac1ed46470ea40277e578fd35ec02a7.tar.gz nextcloud-server-25f523680ac1ed46470ea40277e578fd35ec02a7.zip |
fixing ident
Diffstat (limited to 'lib/private/api.php')
-rw-r--r-- | lib/private/api.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/api.php b/lib/private/api.php index e9d31242e3a..1537cc11dd0 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -271,18 +271,18 @@ class OC_API { */ private static function loginUser(){ - // reuse existing login - $loggedIn = OC_User::isLoggedIn(); - $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; - if ($loggedIn === true && $ocsApiRequest) { + // reuse existing login + $loggedIn = OC_User::isLoggedIn(); + $ocsApiRequest = isset($_SERVER['HTTP_OCS_APIREQUEST']) ? $_SERVER['HTTP_OCS_APIREQUEST'] === 'true' : false; + if ($loggedIn === true && $ocsApiRequest) { - // initialize the user's filesystem - \OC_Util::setUpFS(\OC_User::getUser()); + // initialize the user's filesystem + \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'] : ''; $authPw = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; $return = OC_User::login($authUser, $authPw); |