> Anyone have any tools or libraries that would allow is to validate a login 
> against the AD tree?  Windows Server 2008. 

PROCEDURE validateuser
LPARAMETERS tcLogonName, tcPassword

LOCAL llOK
llOK = .T.

LOCAL loLDAP
IF m.llOK
   TRY
      loLDAP = GETOBJECT("LDAP:")
   CATCH
        llOK = .F.
   ENDTRY
ENDIF

LOCAL loUser
IF m.llOK
   TRY 
      Local lcURL
      lcURL = "LDAP://"+ALLTRIM(This.cLDAPServer)+"/"+m.tcLogonName
      loUser = loLDAP.OpenDsObject( ;
          m.lcURL, ;
          m.tcLogonName, ;
          m.tcPassword, ;
          0x0 ;
      )
      IF NOT VARTYPE(loUser) == T_OBJECT
         llOK = .F.
      ENDIF 
   CATCH
      llOK = .F.
   ENDTRY
ENDIF 

IF NOT m.llOK
   loUser = NULL
ENDIF

RETURN m.loUser

--
Christof
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/9c5bc985-7a1d-480a-834c-58a4b3693...@foxpert.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to