Deletes an infoRouter user.

Syntax

Visual Basic (declaration)
Public Function DeleteUser( _ 
ByVal AuthenticationTicket as String, _ ByVal UserName as String) as XmlNode

C# (declaration)
public XmlNode DeleteUser( 
string AuthenticationTicket, string UserName)

Parameters

AuthenticationTicket
    string infoRouter ticket
UserName
    string The UserName of the user to be deleted.

Return Value

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

Remarks

The caller must be the system administrator or the domain manager of the domain in which the user is a member.

minus gif Example

Visual Basic Example
Public DeleteUser()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxx"
        Const UserNameToBeDeleted As String = "JoeD"

        Dim xmlResponse As System.Xml.XmlElement
        Dim IR_Obj As InfoRouter.srv
        Try
            'Create InfoRouter Object
            IR_Obj = New InfoRouter.srv

            xmlResponse = IR_Obj.DeleteUser(IRAuthenticationTicket, UserNameToBeDeleted)
            If xmlResponse.GetAttribute("success") = "true" Then
                Console.WriteLine("'" & UserNameToBeDeleted & "' has been successfully deleted.")
            Else
                Console.WriteLine("'" & UserNameToBeDeleted & "' cannot be deleted.")
                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

See Also