Remove posix_getlogin() check from posix_getpwnam() test

It doesn't make sense to pass false to posix_getpwnam(). I'm not
sure what exactly this is guarding against, but it won't work in
this form.
This commit is contained in:
Nikita Popov 2019-04-10 14:43:52 +02:00
parent 397ee767fd
commit 33a149afba

View File

@ -12,9 +12,6 @@ User Group: PHPSP #phptestfestbrasil
$uid = posix_geteuid();
$user = posix_getpwuid($uid);
$username = $user['name'];
if (posix_getlogin() == false) {
$username = false;
}
$info = posix_getpwnam($username);
print_r($info);
var_dump($username == $info['name']);