]> source.dussan.org Git - nextcloud-server.git/commitdiff
Small code reorder
authorBart Visscher <bartv@thisnet.nl>
Wed, 20 Jun 2012 06:57:21 +0000 (08:57 +0200)
committerBart Visscher <bartv@thisnet.nl>
Wed, 20 Jun 2012 15:10:48 +0000 (17:10 +0200)
lib/util.php

index 5492587862c443276e64ff947449472765c0db77..f0999b6d201bc2c49c99b3e26275da13ebdf5cbb 100755 (executable)
@@ -19,17 +19,18 @@ class OC_Util {
                        return false;
                }
 
-               // If we are not forced to load a specific user we load the one that is logged in
-               if( $user == "" && OC_User::isLoggedIn()){
-                       $user = OC_User::getUser();
-               }
-
                $CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
                //first set up the local "root" storage
                if(!self::$rootMounted){
                        OC_Filesystem::mount('OC_Filestorage_Local',array('datadir'=>$CONFIG_DATADIRECTORY),'/');
                        self::$rootMounted=true;
                }
+
+               // If we are not forced to load a specific user we load the one that is logged in
+               if( $user == "" && OC_User::isLoggedIn()){
+                       $user = OC_User::getUser();
+               }
+
                if( $user != "" ){ //if we aren't logged in, there is no use to set up the filesystem
                        $userdirectory = $CONFIG_DATADIRECTORY."/$user/$root";
                        if( !is_dir( $userdirectory )){