错误:无法取消设置字符串偏移
文件:/var/www/lib/Cake/Controller/Component/AuthComponent.php
行:781
代码:
if (isset($this->request->data['User'])) {
$this->Auth->login();
}
知道这个错误发生的原因吗?
答案 0 :(得分:0)
AppController.php内部
public $components = array(
'Session',
'Auth' => array(
'loginRedirect' => array(
'controller' => 'pages',
'action' => 'display',
'home'
),
'logoutRedirect' => array(
'controller' => 'pages',
'action' => 'display',
'home'
),
'authError' => 'You must be logged in to view this page.',
'loginError' => 'Invalid Username or Password.',
'authenticate' => array(
'passwordHasher' => 'Blowfish',
)
)
);
身份验证需要
'authenticate' => array(
'Form' => array(
'passwordHasher' => 'Blowfish',
)
)