我试图表演
$this->Auth->allow()
但是,beforeFilter()
我需要将整个控制器添加为例外,即它需要公开并且不需要用户登录。
只是一种快捷的执行方式$this->Auth->allow( every-function-in-this-controller )
答案?
编辑:
我有这个:
<?php
App::uses('AppController','Controller');
class AllzonesController extends AppController {
public function __beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('index');
}
public function index() {
$this->layout = 'main';
$this->set('Hello',"Hello world");
}
}
它正在传输 Auth-login()