【发布时间】:2013-07-03 17:42:41
【问题描述】:
我已经尝试过
$this->Auth->allow() in 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()
【问题讨论】:
标签: php cakephp cakephp-2.3