Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verfity a user with active directory
Message
De
12/12/2013 08:31:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01589992
Message ID:
01589994
Vues:
66
>HI All,
>
>a user has asked is we could use active directory to verify the users rather than our own login, has anyone done this, could point me in the right direction please?
>
>~M

Just get the username

FUNCTION usernaam
LOCAL lcusername,lres
declare integer GetUserName in advapi32 String@, Integer@
lcusername = replicate(chr(0),255)
lres = getusername(@lcusername,255)

if lres # 0
lcusername = left(lcusername,at(chr(0),lcusername)-1)
ELSE
lcusername = ""
ENDIF
RETURN lcusername
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform