Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 CakePHP 项目中,我被要求为用户设置主密码。所以管理员可以使用 CakePHP 的任何用户名和主密码登录。
在我看来,我得到了这个:
xyz.com/LoginAsAnyUser.php
如果您可以提供完整的代码工作代码,以及有关如何集成的说明,这将对我非常有帮助。
我不是蛋糕专家,但我认为这可能是一项非常容易的任务。你不能在控制器中创建一些方法来用用户名填充会话吗?我认为您可以在设置一些基本会话时从登录控制器复制一些代码并根据您的需要创建一个非常具体的代码。
所以基本上选择选项2.)
2.)