user$

Syntax

result = USER$(code)

Arguments

result: text

code: integer

Meaning

Returns the user name (as code = 1) or the user number (as code = 2) or the 'friendly' user name (as code = 3) or the user role as defined in the .pbk or in Active Directory (as code = 4). Both versions of the user name are extracted from Active Directory (namely from the Logon name, respectively the Display name) and pertain to the user currently logged in to Collections.. Of course, the 'friendly' version of the user name can only be retrieved if it has been registered in Active Directory by the system adminstrator. The result is always a text string. On a single-user system, the user number will always be '0', and the username ' ' (the null string).

Example 1

name = user$(1)

Result

name is: MIKE.

Example 2

number = user$(2)

Result

number is: 8.