diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-15 15:17:27 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-30 10:07:18 -0400 |
commit | 89027545a05bddc11572b233dbcae92d905ec599 (patch) | |
tree | 2fdece93ef8427fa767fcbb39699bc1d6c079ca8 /lib/connector/sabre/auth.php | |
parent | 01f25119d5e793d5bd400b492de5887cae9ba73b (diff) | |
download | nextcloud-server-89027545a05bddc11572b233dbcae92d905ec599.tar.gz nextcloud-server-89027545a05bddc11572b233dbcae92d905ec599.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/sabre/auth.php')
-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; + } } } } |