简体   繁体   English

PHP-有什么方法可以获取客户端用户名(AD)

[英]PHP - is there any way to get client user name (AD)

I am developing a web based tool and planning for a role based access to the tool. 我正在开发一个基于Web的工具,并计划对该工具进行基于角色的访问。 Currently all the users who use this tool will access the tool web portal from their laptop after authenticating to it using active directory authentication. 当前,使用此工具的所有用户在使用活动目录身份验证对其进行身份验证后,都将从便携式计算机访问该工具的门户网站。

My server side configuration is based on Apache webserver and PHP on an RHEL machine. 我的服务器端配置基于RHEL计算机上的Apache Web服务器和PHP。

So is there any way to get the AD user ID of the user using which he logged into his laptop, so that I can allow him to access only those pages allowed for him. 因此,有什么方法可以获取他登录到笔记本电脑时使用的用户的AD用户ID,以便我可以允许他仅访问允许他访问的那些页面。

我想你可以用这个

$userName= gethostname();

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM