简体   繁体   English

如何使用PHP显示已登录用户的Active Directory全名?

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

I am trying to display the full name of a user in Active Directory on an Intranet page. 我试图在Intranet页面上的Active Directory中显示用户的全名。 I can display their user id with: 我可以通过以下方式显示其用户ID:

$eadUserName = $_SERVER['LOGON_USER']; $ eadUserName = $ _SERVER ['LOGON_USER']; echo $eadUserName; 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. 我是PHP新手,所以任何信息将不胜感激。 Thank you! 谢谢!

Use PHP LDAP extension in combination with getenv("username") function. 将PHP LDAP扩展名与getenv("username")函数结合使用。

The php.net manual has a list of all posible variations of the extension: http://php.net/manual/en/ref.ldap.php php.net手册列出了扩展的所有可能的变体: http : //php.net/manual/zh/ref.ldap.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用adLDAP显示登录的用户名 - Display logged on users name using adLDAP 如何使用PHP SESSIONS显示用户名? - How to display a users name using PHP SESSIONS? 如何在不使用用户名和密码的情况下使用Active Directory在PHP中对用户进行身份验证 - How to authenticate users in PHP using Active Directory without username and password 使用活动会话列出当前在php中登录的帐户用户 - List currently logged in users of an account in php using active sessions 如何根据 IIS windows 身份验证过滤 ldap 活动目录用户信息,并在 ZE1BFD762321E409C42C 网站中显示该信息? - how to filter ldap active directory users information based on IIS windows authentication and display that information in php website? Joomla 2.5-显示活动的登录用户 - Joomla 2.5 - Display Active Logged-In Users 显示使用php,pdo和mysql的当前登录用户的简单计数器 - Display a simple counter of currently logged in users using php, pdo and mysql 使用adLDAP显示活动目录中所有OU下的所有用户吗? - Display all users under all OUs in active directory using adLDAP? Active Directory和PHP Web应用程序-获取显示名称等 - Active Directory and PHP web Application - Fetching Display Name etc 在PHP中,如何在用户正确登录后显示他们的信息 - In PHP How to display a users information once they have correctly logged in
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM