getlogin
getlogin - return who logged in at this tty
getlogin
Returns the current login from /etc/utmp, if any. If null, use
getpwuid()
.
$login = getlogin || (getpwuid($<))[0] || "Kilroy";
Do not consider
getlogin()
for authorentication: it is not as
secure as
getpwuid()
.