NAME

getlogin - return who logged in at this tty


SYNOPSIS

getlogin


DESCRIPTION

Returns the current login from /etc/utmp, if any. If null, use getpwuid.

    $login = getlogin || getpwuid($<) || "Kilroy";

Do not consider getlogin for authentication: it is not as secure as getpwuid.