find and query an LDAP path with PHP?

Reply

Join Date: Jan 2006
Posts: 12
Reputation: woofytalk is an unknown quantity at this point 
Solved Threads: 0
woofytalk's Avatar
woofytalk woofytalk is offline Offline
Newbie Poster

find and query an LDAP path with PHP?

 
0
  #1
Feb 19th, 2007
The following VBScript below displays a user's Active Directory Display Name. It first finds the user's LDAP path and then querys the path to display the username.

Unfortunately I'm a total newb when it comes to PHP.

I'm looking for the PHP code that will do this exact same thing. I need the PHP code to first find the current user's LDAP path, then query the current user's path to display their Active Directory Display name. Could someone please provide this relatively simple code for me? Can anyone point me to a link that has this code?
[CODE BELOW]

On Error Resume Next

Set objSysInfo = CreateObject("ADSystemInfo")

strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)

WScript.Echo objUser.displayName


Thank you and Kind Regards,
Jason
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC