views:

55

answers:

1

Hello,

I am trying to display the full name of a user in Active Directory on an Intranet page. I can display their user id with:

$eadUserName = $_SERVER['LOGON_USER']; echo $eadUserName;

but need to figure out a way to display their full name instead. I am new to PHP so any info would be greatly appreciated. Thank you!

A: 

Use PHP LDAP extension in combination with getenv("username") function.

The php.net manual has a list of all posible variations of the extension: http://php.net/manual/en/ref.ldap.php

Codex73