[英]Apache User change/create password on first login
I have an index.php page for which i need to add user authentication 我有一个index.php页面,需要为此添加用户身份验证
I have about 80 users that will need access to this page. 我大约有80位用户需要访问此页面。
I want the users to change the password when they first connect to my page or a way for them to create their own password when they first connect with their username 我希望用户在首次连接到我的页面时更改密码,或者让用户在首次使用用户名连接时创建自己的密码的方式
is there a way to implement such a design ??? 有没有办法实现这样的设计?
what will be the best way to do this as I don't wish to give all of them the same default password. 这样做是最好的方法,因为我不想给所有人都使用相同的默认密码。
This is not possible using Apache's built-in htpasswd
authentication, which is an extremely simple and inflexible login system. 使用Apache内置的
htpasswd
身份验证是不可能的,这是一个非常简单和灵活的登录系统。
You will need to write (or find somewhere open source) your own login system, probably backed by a database and PHP session storage. 您将需要编写(或在某个开源地方找到)您自己的登录系统,可能由数据库和PHP会话存储支持。
如果尝试将用户数据存储在数据库中,则可以通过添加一个标志(表字段可能名为:force_new_pass)来完成,如果该标志为true,则显示用户更改密码形式
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.