Returns a list of members of the specified user group.
Visual Basic (declaration) |
---|
Public Function GetUserGroupMembers( _ |
C# (declaration) |
---|
public XmlNode GetUserGroupMembers( |
<response success="true" error="">
<users>
<User exists="true" Domain="" UserName="adamb" FirstName="Adam" LastName="Boeve" Email="adamb@inforouter.com" LastLogonDate="1980-01-01 00:00:00" LastPasswordChangeDate="1980-01-01 00:00:00" AuthenticationAuthority="INFOROUTER" ReadOnlyUser="FALSE" Enabled="TRUE">
<Preferences>
<Language>
</Language>
<DefaultPortal>
</DefaultPortal>
<ShowArchives>FALSE</ShowArchives>
<ShowHiddens>FALSE</ShowHiddens>
<NotificationType>INSTANT</NotificationType>
<EmailType>HTML</EmailType>
<AttachDocumentToEmail>FALSE</AttachDocumentToEmail>
</Preferences>
</User>
<User exists="true" Domain="" UserName="diannaf" FirstName="Dianna" LastName="Finch" Email="diannaf@inforouter.com" LastLogonDate="1980-01-01 00:00:00" LastPasswordChangeDate="1980-01-01 00:00:00" AuthenticationAuthority="INFOROUTER" ReadOnlyUser="FALSE" Enabled="TRUE">
<Preferences>
<Language>
</Language>
<DefaultPortal>
</DefaultPortal>
<ShowArchives>FALSE</ShowArchives>
<ShowHiddens>FALSE</ShowHiddens>
<NotificationType>INSTANT</NotificationType>
<EmailType>HTML</EmailType>
<AttachDocumentToEmail>FALSE</AttachDocumentToEmail>
</Preferences>
</User>
</users>
</response>
Visual Basic Example |
---|
Public Sub GetUserGroupMembers() Const IRAuthenticationTicket As String = "sid-xxxxxxxxxxxxxx" 'leave it empty string if the usergroup is a global usergroup Const IR_DomainName As String = "Knowledge Base" Const IR_UserGroupName As String = "Authors" Dim IR_Obj As InfoRouter.srv Dim xmlResponse As System.Xml.XmlElement Try IR_Obj = New InfoRouter.srv xmlResponse = IR_Obj.GetUserGroupMembers(IRAuthenticationTicket, _ IR_DomainName, _ IR_UserGroupName) If xmlResponse.GetAttribute("success") = "true" Then Dim xmlusersElem As System.Xml.XmlElement xmlusersElem = xmlResponse.FirstChild Dim xmlelem As System.Xml.XmlElement For Each xmlelem In xmlusersElem.ChildNodes Console.WriteLine(xmlelem.GetAttribute("UserName")) Next xmlusersElem = Nothing Else Console.WriteLine("Group members cannot be reached.") 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 |