Add function dol_getwebuser

This commit is contained in:
Laurent Destailleur 2011-06-01 14:05:08 +00:00
parent 4e376fb87c
commit b7d190518f

View File

@ -23,6 +23,19 @@
* \version $Id$
*/
/**
* Return user/group account of web server
* @param $mode 'user' or 'group'
* @return string
*/
function dol_getwebuser($mode)
{
$t='?';
if ($mode=='user') $t=getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty
if ($mode=='group') $t=getenv('APACHE_RUN_GROUP');
return $t;
}
/**
* Scan a directory and return a list of files/directories.
* Content for string is UTF8 and dir separator is "/".