diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-15 15:17:27 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-15 15:17:27 -0400 |
commit | b1a7826d56bbd779ef306cebd0d9f89faa878f14 (patch) | |
tree | c1bcd7ddb96a28b197e5e99f2d82af49c6fe5c9f /lib/connector | |
parent | a1b9b4b43e211fc2c87316ccf9660bb103e235e9 (diff) | |
download | nextcloud-server-b1a7826d56bbd779ef306cebd0d9f89faa878f14.tar.gz nextcloud-server-b1a7826d56bbd779ef306cebd0d9f89faa878f14.zip |
Check if user is already logged in for DAV auth, instead of logging in and creating new sessions for every request
Diffstat (limited to 'lib/connector')
-rw-r--r-- | lib/connector/sabre/auth.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/connector/sabre/auth.php b/lib/connector/sabre/auth.php index ee680391626..99f696e3a07 100644 --- a/lib/connector/sabre/auth.php +++ b/lib/connector/sabre/auth.php @@ -31,13 +31,18 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic { * @return bool */ protected function validateUserPass($username, $password){ - OC_Util::setUpFS();//login hooks may need early access to the filesystem - if(OC_User::login($username,$password)){ - OC_Util::setUpFS($username); + if (OC_User::isLoggedIn()) { + OC_Util::setupFS($username); return true; - } - else{ - return false; + } else { + OC_Util::setUpFS();//login hooks may need early access to the filesystem + if(OC_User::login($username,$password)){ + OC_Util::setUpFS($username); + return true; + } + else{ + return false; + } } } } |