Returns the localized names of a user's roles.
<HsvSecurityAccess>.EnumRolesForUser bstrUser, bstrLangId, pvarabstrRoleNames
Argument | Description |
---|---|
bstrUser | String (ByVal). The user's security identifier. |
bstrLangId | String (ByVal). The ID of the language in which to return the role names. Valid values are represented by the constants listed in Table 102, tagHFMDIMENSIONS Enumeration. |
pvarabstrRoleNames | Variant array. Returns the localized role names. The array's subtype is String. |
The following function returns the English-language names of the connected user's roles.
Function GetUsersRolesEnglish() As Variant Dim sSId As String, sName As String, cSecurity As HsvSecurityAccess Dim vaRoles As Variant 'g_cSession represents an HsvSession instance Set cSecurity = g_cSession.Security cSecurity.GetConnectedUser2 sSId, sName cSecurity.EnumRolesForUser sSId, CStr(HFM_LANGUAGE_ENGLISH), vaRoles GetUsersRolesEnglish = vaRoles End Function