GetUserMemberships event

This event occurs when a successful authentication has occurred.

This event is used by the script specified on the Authentication tab by the Restricted Access User Membership option.

GetUserMemberships ( User )
Argument Description
User The authenticate user object.

Remarks

You can use this event to authenticate the return the ACL group memberships for the logged in user. The return value should be a semicolon separated list of users.

Examples

Function GetUserMemberships(User)
   If (User.UserName = "JohnD") Then
      GetUserMemberships = "Group1;Group2"
   End If
End Function
         

To block access to either a menu or form, include code such as the following:

Function GetUserMemberships(User)
   If (User.UserID = "99999") Then
      GetUserMemberships = "authorized"
   Else
      GetUserMemberships = "notauthorized"
   End If
End Function
      

Use the following script in order to view attributes from the CAC card. Run the script and view the attributes in the Windows event log.

Function GetUserMemberships(User)
  cnt = User.PropertyCount
  Set shell = CreateObject("WScript.Shell")
  For i = 0 To cnt - 1
    shell.LogEvent 4, User.PropertyName(i)
    shell.LogEvent 4, User.PropertyValue(i)
    If (User.PropertyName(i) = "UPN") Then
      If ( User.PropertyValue(i) = "2001393041@mil") Then
        GetUserMemberships = "approved"
      Else
        GetUserMemberships = "notapproved"
      End If
    End If
  Next
End Function          
        

By setting a value such as “notauthorized”, the user will be restricted from access to a menu or form where the entry for Restrict Access is “notauthorized”. The Restrict Access entry is made on the General tab when configuring any form or on the menu configuration page.

User Properties

UserName
Returns the authenticated user name.
EmailAddress
Returns the authenticated email address if it is available for a user.
UserID

Returns the authenticated user ID if it is available for a user.

When CAC authentication has been enabled, the following can be returned:

AuthType The authentication type for the authenicated user.
DisplayName The display name of the authenticated user.
DoDEDI The authenticated user's DOD EDI ID.
Email The email address of the authenticated user.
FirstName The first name of the authenticated user.
LastName The last name of the authenticated user.
MiddleName The middle name of the authenticated user.
Status The status for the authenticated user.
UPN The UPN for the authenticated user.
UserID The user ID of the authenticated user.