Updates the email address of the specified user.

Syntax

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

C# (declaration)
public XmlNode UpdateUserEmail( 
string AuthenticationTicket, string UserName, string NewEmailAddress)

Parameters

AuthenticationTicket
    string inforouter ticket
UserName
    string The User Name of the user you wish to change the email address
NewEmailAddress
    string The new email value of the user

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", the email address has been updated successfully
if success = "false", the error attribute returns the error description.

Remarks

The caller must be sysadmin, the domain manager or the user him/her self.

minus gif Example

Visual Basic Example
Sub UpdateUserEmail_sample()
        Const IRAuthenticationTicket as String="sid-xxxxxxxxxxxxxxxxxxxx"
        Const IR_UserName As String = "TestUser"
        Const IR_NewEmailAddress As String = "testUser@abccorp.com" 

        '**** END OF INPUT CONSTANTS ****


        Dim IR_OBJ As InfoRouter.srv

        Dim xmlResponse As System.Xml.XmlElement
        Try
            ClearOutputWindow()
            WriteOutputLine("[UpdateUserEmail]")
            WriteOutputLine("UserName   = " & IR_UserName)
            WriteOutputLine("Email Address= " & IR_NewEmailAddress)
            WriteOutputLine("---------------------------")
            Application.DoEvents()
            Me.ActiveForm.Cursor = Cursors.WaitCursor

            IR_OBJ = New InfoRouter.srv
            IR_OBJ.Url = (txtSrvUrl.Text & "/srv.asmx")

            xmlResponse = IR_OBJ.UpdateUserEmail(AuthenticationTicket, IR_UserName, IR_NewEmailAddress)
            If xmlResponse.GetAttribute("success") = "true" Then
                WriteOutputLine("The User email address has been updated.")
            Else
                WriteOutputLine("server response:" & xmlResponse.GetAttribute("error"))
            End If
            xmlResponse = Nothing

        Catch ex As Exception
            WriteOutputLine("error:" & ex.Message)
        Finally
            IR_OBJ = Nothing
            Me.ActiveForm.Cursor = Cursors.Default
        End Try
End Sub