mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
N°2517 - Supportability : system report (user name)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user