Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine A User's Full Name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00577470
Message ID:
00577663
Vues:
36
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform