Returns a list of local users of the specified domain/library.

Syntax

Visual Basic (declaration)
Public Function GetLocalUsers( _ 
ByVal AuthenticationTicket as String, _ ByVal DomainName as String) as XmlNode

C# (declaration)
public XmlNode GetLocalUsers( 
string AuthenticationTicket, string DomainName)

Parameters

AuthenticationTicket
    string infoRouter ticket
DomainName
    string The Domain name of the users you wish to get

Return Value

returns xml fragment. response elements has two attributes that are "success" and "error".
if success equals "true" then sub xml element "users" generated on the server if else the error attribute returns the error message.


<response success="true" error="">
<users>
<user username="user1" .... >
....
</user>
<usergroups/>
</response> 
<//xml>

Remarks

The caller must be system administrator or the domain member of the specified domain.

minus gif Example

Visual Basic Example
Public Sub GetLocalUsers_Sample()
        Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxxx"
        Const IR_DomainName As String = "Public"
 
        Dim IR_Obj As InfoRouter.srv
        Dim xmlResponse As System.Xml.XmlElement
        Try
 
            IR_Obj = New InfoRouter.srv
 
            xmlResponse = IR_Obj.GetLocalUsers(IRAuthenticationTicket, _
                                                IR_DomainName)
 
            If xmlResponse.GetAttribute("success") = "true" Then
                Console.WriteLine("-- " & IR_DomainName & " [Local Users] --")
  
                Dim xmlUsers As System.Xml.XmlElement = xmlResponse.FirstChild
                Dim xmlUser As System.Xml.XmlElement
                 
                For Each xmlUser In xmlUsers.ChildNodes
                    Console.WriteLine( _
                        xmlUser.GetAttribute("UserName") & vbTab & _
                        xmlUser.GetAttribute("FirstName") & vbTab &  _
                        xmlUser.GetAttribute("LastName"))
                Next
                Console.WriteLine("-----------")
                xmlUsers = Nothing
 
            Else
                Console.WriteLine("The Local Users cannot be listed.")
                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