Performs a filtered search that returns the security identifiers and usernames of matching users and groups. Filtering options include wildcard searching on usernames and filtering by user category.
<HFMwSecurity>.EnumUsersWithFilter bstrFilter, lBitFieldPrincipalsToReturn, pvarabstrSIDs, pvarabstrUserNames
Argument | Description |
---|---|
bstrFilter | The string by which to search user and group names. For wildcard searches, use asterisks ( * ). Input argument. String subtype. |
lBitFieldPrincipalsToReturn | A bitmask that represents the user categories by which to filter. Valid values for the bits are listed in Search Filters. Input argument. Long subtype. |
pvarabstrSIDs | Returns the security identifiers for the users and groups that match the search criteria. Input/output argument. |
pvarabstrUserNames | Returns the names of the users and groups that match the search criteria. Input/output argument. |
The following function returns an array of the user and group names that begin with the specified string.
Function GetUsersByPrefix(sPrefix) Dim cSecurity, vaIds, vaNames Set cSecurity = Server.CreateObject("Hyperion.HFMwSecurity") 'g_cHFMSession represents an HFMwSession instance cSecurity.SetWebSession g_cHFMSession cSecurity.EnumUsersWithFilter sPrefix & "*", HFM_USER_GROUP_ENUM_GROUPS _ & HFM_USER_GROUP_ENUM_USERS, vaIds, vaNames GetUsersByPrefix = vaNames End Function