Skip to main content
Version: Next

Current user

Current user {( user )} -> Function result

ParameterTypeDescription
userLongint🡒User alias or 4D user account
Function resultString🡐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:

ConstantValueComment
4D user account14D user account name.
4D user alias2Alternate 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 account0Alternate 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