Creates an infoRouter user.
Visual Basic (declaration) |
---|
Public Function CreateUser( _ |
C# (declaration) |
---|
public XmlNode CreateUser( |
Visual Basic Example |
---|
Public Sub CreateUser() Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxx" 'Set empty string if the user will be a global user. Const IR_DomainName As String = "Public" Const IR_UserName As String = "JaneC" Const IR_FirstName As String = "Jane" Const IR_LastName As String = "Crane" Const IR_EmailAddress As String = "JaneC@acme.com" Const IR_Password As String = "jane123" Const IR_ReadOnlyUser As Boolean = False Const AuthenticationSource As String="INFOROUTER" Dim IR_Obj As InfoRouter.srv Dim xmlResponse As System.Xml.XmlElement Try IR_Obj = New InfoRouter.srv xmlResponse = IR_Obj.CreateUser(IRAuthenticationTicket, _ IR_DomainName, _ IR_UserName, _ IR_FirstName, _ IR_LastName, _ IR_EmailAddress, _ IR_Password, _ IR_ReadOnlyUser, _ AuthenticationSource) If xmlResponse.GetAttribute("success") = "true" Then Console.WriteLine("The user '" & IR_UserName & "' has been successfully created.") Else Console.WriteLine("'" & IR_UserName & "' cannot be created.") 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 |