mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Return a dummy PHP username in case the POSIX module is not available
This commit is contained in:
parent
81e06fe570
commit
4d8842db09
@ -152,8 +152,12 @@ class Platform
|
|||||||
return get_current_user(); // http://php.net/manual/en/function.get-current-user.php#75059
|
return get_current_user(); // http://php.net/manual/en/function.get-current-user.php#75059
|
||||||
}
|
}
|
||||||
|
|
||||||
$userInfo = posix_getpwuid(posix_geteuid());
|
if (function_exists('posix_geteuid')) {
|
||||||
return $userInfo['name'];
|
$userInfo = posix_getpwuid(posix_geteuid());
|
||||||
|
return $userInfo['name'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'php_username';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user