Current user
Current user {( user )} : Text
Parameter | Type | Description | |
---|---|---|---|
user | Integer | → | User alias or 4D user account |
Function result | Text | ← | User name of the current user |
Description
Current user returns the alias or account name of the current user.
By default if the user parameter is omitted, if an alias has been defined for the user with SET USER ALIAS during the session, the command returns the user alias. Otherwise, it returns the 4D user account name.
In the optional user parameter, you can specify which of the following you want returned:
Constant | Value | Comment |
---|---|---|
4D user account | 1 | 4D user account name. |
4D user alias | 2 | Alternate name for 4D user account if defined with the SET USER ALIAS command or empty string ("") if no alias is defined for the 4D user. |
4D user alias or account | 0 | Alternate name for 4D user account as defined with the SET USER ALIAS command, or regular 4D user account name if no alias is defined. |
Example
See example for the User in group command.
See also
CHANGE CURRENT USER
CHANGE PASSWORD
SET USER ALIAS
User in group