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