EmbedIT-WebIT
view release on metacpan or search on metacpan
lib/EmbedIT/WebIT.pm view on Meta::CPAN
# --------------------------------------------------------------------------------------
# get user id from given id or name
#
sub __get_uid {
my ($i_id) = @_;
my ($n, $p, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwnam($i_id);
if (not defined $uid) {
($n, $p, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwuid($i_id);
if (not defined $uid) {
return 0;
}
}
return $uid;
}
# --------------------------------------------------------------------------------------
# get group id from given id or name
( run in 0.359 second using v1.01-cache-2.11-cpan-8d75d55dd25 )