Christof,
lcURL = "LDAP://"+ALLTRIM(This.cLDAPServer)+"/"+m.tcLogonName
This line fails. What is the value of This.cLDAPServer, supposed to be? It
looks like you cut some code from a class,
but this is not a class.
Rick
White Light Computing, Inc.
www.whitelightcomputing.com
www.swfox.net
www.rickschummer.com
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Christof Wollenhaupt
Sent: Thursday, July 05, 2012 02:45
To: [email protected]
Subject: Re: Active Directory from VFP
> 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
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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.