Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine A User's Full Name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00577470
Message ID:
00577663
Views:
35
Larry,

I used the example you gave me last week, with a small addition:

FUNCTION GetUserNames
LPARAMETERS aArray, cDomain

  LOCAL nTotUsers, oGroup, oUser, cUser
  nTotUsers = 0

  oGroup = GETOBJECT("WinNT://" + cDomain)

    FOR EACH oUser IN oGroup

    IF UPPER(oUser.Class) = "USER"

      nTotUsers = nTotUsers + 1
      DIMENSION aArray[nTotUsers, 2]

      aArray[nTotUsers, 1] = LOWER(oUser.Name)
      aArray[nTotUsers, 2] = LOWER(oUser.FullName)

      ENDIF

  ENDFOR

  =ASORT(aArray, 1)

RETURN nTotUsers


This works fine, except it's slow.

One other thing. Any way to pick put the 'real' users, and not include
the servers and other entries, like 'TmpUser' and the like?

Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform