You are here: Core Reference > Coding > Scripting > Server.UserName

Server.UserName

The UserName property is a server property that - when called from a Mimic - returns the name of the currently logged on user on that client.

Syntax

Server.UserName

Description

Returns the user name of the currently logged on user.

Arguments

None.

Returns

UserName {string}

The user name of the currently logged on user.

Example:

The following script is used to display a message box that contains the name of the currently logged on user:

sCurrentUser = Server.UserName

MsgBox sCurrentUser


Where:

  • sCurrentUser is the name of the variable used to store the UserName that is returned by the UserName property.
  • MsgBox sCurrentUser instructs the script to display a message box containing the value that is stored in the sCurrentUser variable.

See also:

App.LogOn and App.LogOff.


ClearSCADA 2015 R2