mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:50:11 +00:00
3) Introducing ConfigFactory
This commit is contained in:
parent
5c50684b50
commit
4af0119b73
23 changed files with 843 additions and 632 deletions
|
@ -286,6 +286,23 @@ class System extends BaseObject
|
|||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the system user that is executing the script
|
||||
*
|
||||
* This mostly returns something like "www-data".
|
||||
*
|
||||
* @return string system username
|
||||
*/
|
||||
public static function getUser()
|
||||
{
|
||||
if (!function_exists('posix_getpwuid') || !function_exists('posix_geteuid')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$processUser = posix_getpwuid(posix_geteuid());
|
||||
return $processUser['name'];
|
||||
}
|
||||
|
||||
/// @todo Move the following functions from boot.php
|
||||
/*
|
||||
function killme()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue