[Nostromo] If user is not defined, get current running user

This commit is contained in:
Andrés Montañez
2017-01-03 22:43:08 -03:00
parent 886b7edcf6
commit 92d63f3814
4 changed files with 23 additions and 2 deletions
+11
View File
@@ -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'];
}
}