User logon name (sys.UserName)ΒΆ

sys.UserName,,a0,,v

User logon name

The user logon name. This is blank on single-user systems.

If the environment variable LOGNAME is set, then sys.UserName is set to the value of LOGNAME.

If LOGNAME is not set, the value is obtained from the operating system.

The value of sys.UserName cannot be updated.

The variable sys.LoggedOnUser, introduced in Sculptor 5.4.1, provides a more secure method of retrieving the user name. It obtains the name from an operating system call. Changing LOGNAME therefore has no effect on it.

Note

On some systems, obtaining the user name from the operating system is very slow, and can have a noticeable impact on performance when there are frequent exec calls to new programs. Setting the environment variable LOGNAME avoids any delays.


EXAMPLE

+textbox UserBox at 60,10 {
     field = sys.UserName
     label = "User"
}

...
display UserBox

RELATED TOPICS

Environment variables

sys.LoggedOnUser