mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-09 14:58:57 +02:00
[Nostromo] If user is not defined, get current running user
This commit is contained in:
@@ -446,4 +446,15 @@ class Runtime
|
||||
{
|
||||
return tempnam(sys_get_temp_dir(), 'mage');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current user
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCurrentUser()
|
||||
{
|
||||
$userData = posix_getpwuid(posix_geteuid());
|
||||
return $userData['name'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user