Function: user-login-name

Return the name under which the user logged in, as a string.
This is based on the effective uid, not the real uid.
Also, if the environment variables LOGNAME or USER are set,
that determines the value of this function.

If optional argument UID is an integer or a float, return the login name
of the user with that uid, or nil if there is no such user. (fn &optional UID)

Variable: user-login-name

The user's name, taken from environment variables if possible.