| | |
find and query an LDAP path with PHP?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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
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
- Apache (Linux Servers and Apache)
- MySQL++ query question (C++)
- PHP installation possible errors? (PHP)
- Says cannot find URL whenever I type anything in (Web Browsers)
- Php code confusion. Not sure how to describe (PHP)
- PHP Query, Make users login before accessing a movie? (PHP)
- ftp help (PHP)
- Please help us to beta-test PHP editor (PHP)
- Using PHP, MySQL and Apache Server (PHP)
Other Threads in the PHP Forum
- Previous Thread: Problems with PHP and the mysql_connect() command.
- Next Thread: Struggling with Captcha
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





