您好我正在学习cakephp框架,我做了一个auth组件教程,它工作,我可以登录用户但是当我添加cakestrap主题时,我从chrome获得了重定向问题“网页有一个重定向循环”
这是我的AppControllerClass
class AppController extends Controller {
public $theme = 'Cakestrap';
public $components = array(
'Session',
'Auth'=>array(
'loginRedirect'=>array('controller'=>'users', 'action'=>'index'),
'logoutRedirect'=>array('controller'=>'users', 'action'=>'index'),
'authError'=>"You can't access that page",
'authorize'=>array('Controller')
)
);
public function isAuthorized($user) {
return true;
}
public function beforeFilter() {
$this->Auth->allow('index', 'view');
$this->set('logged_in', $this->Auth->loggedIn());
$this->set('current_user', $this->Auth->user());
}
}
感谢您的回答