开发者

How to display logged in users Active Directory full name using PHP?

开发者 https://www.devze.com 2023-01-11 14:51 出处:网络
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:

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 $eadUserN开发者_运维技巧ame;

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!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消