Removes a member from the specified user group.

Syntax

Visual Basic (declaration)
Public Function RemoveUsergroupMember( _ 
ByVal AuthenticationTicket as String, _ ByVal DomainName as String, _ ByVal GroupName as String, _ ByVal UserName as String) as XmlNode

C# (declaration)
public XmlNode RemoveUsergroupMember( 
string AuthenticationTicket, string DomainName, string GroupName, string UserName)

Parameters

AuthenticationTicket
    string inforouter ticket
DomainName
    string The DomainName of the usergroup if it is local.
GroupName
    string The name of the usergroup
UserName
    string The UserName of the User to be removed

Return Value

returns xml fragment.
<response success="true" error="">
if success attribute "true", the user has been removed from usergroup.
if success attribute "false", the error attribute returns the error description.

Remarks

The caller must be the system administrator or the domain manager of the local usergroup.

minus gif Example

Visual Basic Example
Public Sub RemoveUsergroupMember()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxxx"
        Const IR_DomainName As String = "Knowledge Base"
        Const IR_UserGroup As String = "Authors"
        Const IR_UserName As String = "JoeD"

        Dim IR_Obj As InfoRouter.srv
        Dim xmlResponse As System.Xml.XmlElement
        Try

            IR_Obj = New InfoRouter.srv
            xmlResponse = IR_Obj.RemoveUsergroupMember(IRAuthenticationTicket, _
                                                       IR_DomainName, _
                                                       IR_UserGroup, _
                                                       IR_UserName)
            If xmlResponse.GetAttribute("success") = "true" Then
                Console.WriteLine("The user removed from the user group")
            Else
                Console.WriteLine("The User cannot be removed from the group.")
                Console.WriteLine("server response:" & xmlResponse.GetAttribute("error"))
            End If
            xmlResponse = Nothing

        Catch ex As Exception
            Console.WriteLine("error:" & ex.Message)
        Finally
            IR_Obj = Nothing
        End Try
End Sub