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).
If users log in via SSO (single sign-on), the user$ function might not work as expected because the authentication provider may register user names in a different way, as e-mail addresses for example. If you don't want such deviating user names to end up on the Management details tab in records, you could consider changing those deviating names into 'friendly' user names in the storage adapl(s) for the different .infs. After the existing call to the user$ function in the adapl you would then have to create a conversion list of all e-mail/user names similar to the following (for tag mn in this case):
if (mn = 'name1@ourmuseum.nl') { mn = 'othername1' )
if (mn = 'name2@ourmuseum.nl') { mn = 'othername2' )
...
Example 1
name = user$(1)
Result
name is: MIKE.
Example 2
number = user$(2)
Result
number is: 8.