Page 1 of 1

LDAP

Posted: Wed Aug 25, 2010 10:10 am
by RDalzell
Has anybody developed an interface for the LDAP user information.

I would like to provide a single signon access via the network login, rather than requiring the user to login into each application individually.

Any suggestions would be appreciated.

Rick

Re: LDAP

Posted: Fri Aug 27, 2010 12:13 am
by Tom
I don't use LDAP, but I allow (via preferences) to automatically login users to my app which have the same username inside the app as they have for Windows.

This is the function to get the Windows user name:

Code: Select all

STATIC FUNCTION xw32_GetUserName()
  LOCAL nxDll, cCall, cRetVal := space(256), nRetVal := 0, nSize := 255
  nxDll := DllLoad( "ADVAPI32.DLL")
  IF nxDll != 0
      nRetVal := DllCall( nxDll, DLL_STDCALL, "GetUserNameA", ;
                          @cRetVal, @nSize )
      DllUnload( nxDll )
  ENDIF
RETURN ( Upper(StrTran(cRetVal,Chr(0),'')) )