# EsbAddToGroup

Description

EsbAddToGroup() adds a user to the list of group members.

Syntax

    EsbAddToGroup (hCtx, GroupName, User)

    ByVal hCtx    As Long
    ByVal GrpName As String
    ByVal User    As String

Parameters

hCtx | Essbase VB API context handle.
GroupName | Group name.
User | Name of user to add to the group list.

Return Value

None.

Notes

- In addition to adding the specified user to the list of members for the specified group, this function adds the group to the user's own list of associated groups.

Access

This function requires the caller to have Create/Delete User privilege (ESB_PRIV_USERCREATE) for the logged in server.

Example

    Declare Function EsbAddToGroup Lib "ESBAPIW" (ByVal hCtx As Long,
    ByVal GroupName As String, ByVal User As String) As Long
    Sub ESB_AddToGroup ()
       Dim sts As Long
       Dim GroupName As String
       Dim User As String
       GroupName = "PowerUsers"
       User = "Jim Smith"
       '******************
       ' Add user to group
       '******************
       sts = EsbAddToGroup (hCtx, GroupName, User)
    End Sub

See Also

EsbDeleteFromGroup()
EsbGetGroupList()
EsbListGroups()
EsbSetGroupList()