944,111 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4134
  • PHP RSS
Feb 19th, 2007
0

find and query an LDAP path with PHP?

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
woofytalk is offline Offline
12 posts
since Jan 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Problems with PHP and the mysql_connect() command.
Next Thread in PHP Forum Timeline: Struggling with Captcha





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC