diff options
author | Georg Ehrke <georg.stefan.germany@googlemail.com> | 2011-10-13 21:59:16 +0200 |
---|---|---|
committer | Georg Ehrke <georg.stefan.germany@googlemail.com> | 2011-10-13 21:59:16 +0200 |
commit | a01d10e57db1893939d0a7706fad239df537e24b (patch) | |
tree | 3649dab6d0006981225f88574b26447f9fbeac1f /lib/util.php | |
parent | 4cbae823eb742fac80288c6c74acba26e0a9c5d6 (diff) | |
parent | db2fb38746bb9d89b402c3a768a247945d813989 (diff) | |
download | nextcloud-server-a01d10e57db1893939d0a7706fad239df537e24b.tar.gz nextcloud-server-a01d10e57db1893939d0a7706fad239df537e24b.zip |
Merge branch 'master' into calendar
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index 4920d13914d..0f8cc08fce6 100644 --- a/lib/util.php +++ b/lib/util.php @@ -271,9 +271,8 @@ class OC_Util { * Try to get the username the httpd server runs on, used in hints */ public static function checkWebserverUser(){ - $stat=stat($_SERVER['DOCUMENT_ROOT']); - if(is_callable('posix_getpwuid')){ - $serverUser=posix_getpwuid($stat['uid']); + if(is_callable('posix_getuid')){ + $serverUser=posix_getpwuid(posix_getuid()); $serverUser='\''.$serverUser['name'].'\''; }elseif(exec('whoami')){ $serverUser=exec('whoami'); |