This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
Current user

Current user 


 

Current user {( user )} -> Function result 
Parameter Type   Description
user  Longint in User alias or 4D user account
Function result  String in User name of the current user

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

 
PROPERTIES 

Product: 4D
Theme: Users and Groups
Number: 182

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: < 4D v6
Modified: 4D v17 R5

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)