summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-20 08:57:21 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-20 17:10:48 +0200
commit5c8e774cea24bd964632ae96357a308272753513 (patch)
tree79a384a6e48db21150fc3c97f13b7716595909dc /lib
parent6644511124d0f93ca6636344db5455da6d160c3d (diff)
downloadnextcloud-server-5c8e774cea24bd964632ae96357a308272753513.tar.gz
nextcloud-server-5c8e774cea24bd964632ae96357a308272753513.zip
Small code reorder
Diffstat (limited to 'lib')
-rwxr-xr-xlib/util.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 5492587862c..f0999b6d201 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -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 )){