Determines whether the given user name refers to an existing user.
Visual Basic (declaration) |
---|
Public Function UserExists( _ |
C# (declaration) |
---|
public XmlNode UserExists( |
Visual Basic Example |
---|
Public Sub UserExists() Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxx" Const IR_UserToBeTested As String = "JoeD" Dim IR_Obj As InfoRouter.srv Dim xmlResponse As System.Xml.XmlElement Try IR_Obj = New InfoRouter.srv xmlResponse = IR_Obj.UserExists(IRAuthenticationTicket, IR_UserToBeTested) If xmlResponse.GetAttribute("success") = "true" Then Console.WriteLine("The user '" & IR_UserToBeTested & "' exists") Else Console.WriteLine("'" & IR_UserToBeTested & "'") 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 |