]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if user is already logged in for DAV auth, instead of logging in and creating...
authorMichael Gapczynski <mtgap@owncloud.com>
Sun, 15 Jul 2012 19:17:27 +0000 (15:17 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Mon, 30 Jul 2012 14:07:18 +0000 (10:07 -0400)
lib/connector/sabre/auth.php

index ee68039162647beab589a2711f0de4767bd40e4e..99f696e3a0711963b689a3d34aa3a132528c0248 100644 (file)
@@ -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;
+                       }
                }
        }
 }