N°2517 - Supportability : system report (user name)

This commit is contained in:
Eric
2019-11-04 12:05:46 +01:00
parent 57116ef054
commit 9054dcb9ff
2 changed files with 11 additions and 1 deletions

View File

@@ -2172,4 +2172,14 @@ class utils
{
return APPROOT.'env-'.utils::GetCurrentEnvironment().'/'.$sModule.'/';
}
public static function GetCurrentUserName()
{
if (function_exists('posix_getpwuid'))
{
return posix_getpwuid(posix_geteuid())['name'];
}
return getenv('username');
}
}