PHP.nl

posix_getpwnam

posix_getpwnam

Return info about a user by username

 **posix_getpwnam** string $username

Returns an of information about the given user. array

usernameAn alphanumeric username.

On success an array with the following elements is returned, else false is returned:

**Voorbeeld: Example use of **

<?php

$userinfo = posix_getpwnam("tom");

print_r($userinfo);
?>
Array
(
    [name]    => tom
    [passwd]  => x
    [uid]     => 10000
    [gid]     => 42
    [gecos]   => "tom,,,"
    [dir]     => "/home/tom"
    [shell]   => "/bin/bash"
)

posix_getpwuid