cakephp3.0认证

时间:2015-03-27 09:10:53

标签: authorization cakephp-3.0

嘿在cakephp3.0的身份验证我面临一些问题嘿我怎样才能创建基于患者表和患者控制器的身份验证,如url / patient / login我有控制器,模型和表单准备但是当我去登录页面当我尝试在Patientcontroller中添加此代码时,它总是在usertable中搜索查询:

$this->Auth->config('authenticate', [
AuthComponent::ALL => ['userModel' => 'Members'],
'Basic',
'Form']);

我收到此错误:

错误:Class' App \ Controller \ AuthComponent'未找到 文件D:\ xampp \ htdocs \ hwapp \ src \ Controller \ PatientController.php 行:34``

1 个答案:

答案 0 :(得分:0)

请阅读文档的这一部分:http://book.cakephp.org/3.0/en/controllers/components/authentication.html#configuring-authentication-handlers

它解释了如何使用其他表来处理登录以及如何告诉AuthComponent使用其他控制器和操作来处理逻辑。