woofytalk 0 Newbie Poster

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?

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[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