0

您好,我正在学习 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());
    }
}

谢谢你的回答

4

0 回答 0