Topic
  • 1 reply
  • Latest Post - ‏2009-11-12T14:18:18Z by Mark_G
SystemAdmin
SystemAdmin
280 Posts

Pinned topic How to get a list of userclasses that are in AccessManager? Not users!

‏2009-10-22T10:22:04Z |
Hi

Does anybody know how to get a list of userclasses from AccessManager? I have used getUserList.mac that I found from this site, but with it I can't produce a list that has only userclasses in certain order.

If my AccessManager looks like this
RootUserClass
1 a
11 aa
12 ab
2 b
21 ba
22 bb
211 baa

I would like to have a report that looks like this:

0 RootUserClass
1 1 a
2 11 aa
2 12 ab
1 2 b
2 21 ba
2 bb
3 211 baa

I tried to count the levels, but this object thing confuses me. It doesn't work like I think it would. Code (only sub part) is below.

Sub Get_Users_List( UserClass As Object, Level as Integer)
Dim I As Integer
Dim J as Integer
Print #1, UserClass.Parent & ";" & UserClass.Name & Level
If UserClass.UserClasses.Count >= 0 Then
For I = 1 To UserClass.UserClasses.Count
Level = Level + 1
Call Get_Users_List(UserClass.UserClasses(I), Level)
Next
End If
Level = 0
End Sub
Updated on 2009-11-12T14:18:18Z at 2009-11-12T14:18:18Z by Mark_G
  • Mark_G
    Mark_G
    1 Post

    Re: How to get a list of userclasses that are in AccessManager? Not users!

    ‏2009-11-12T14:18:18Z  
    .......