| 4D v18Current user | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 Current user 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Current user {( user )} -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| user | Longint |   | User alias or 4D user account | |||||
| Function result | String |   | 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. | 
See example for the User in group command.
									CHANGE CURRENT USER
									
									CHANGE PASSWORD
									
									SET USER ALIAS
									
									User in group
									
	Product:  4D
	Theme:  Users and Groups
	Number:  
        182
        
        
        
	
	Created:  < 4D v6
	Modified:  4D v17 R5
	
	
	4D Language Reference ( 4D v18)
	
	
	
 Add a comment
Add a comment