public static function getUser()
{
if (function_exists('shell_exec')) {
return trim(shell_exec('whoami'));
}
$currentUser = get_current_user();
if (!empty($currentUser)) {
return $currentUser;
}
return 'www-data';
}
/** * @param $path * @return string */ private function getMessageWhenFileExistsButNotReadable($path) { $format = " \n<b>» %s </b>"; if (Common::isPhpCliMode()) { $format = "\n » %s \n"; } return sprintf($format, $this->translator->translate('General_ExceptionConfigurationFilePleaseCheckReadableByUser', array($path, Filechecks::getUser()))); }