As a personal preference, I would store it in the session. This way it
can be accessed outside of the controller as well.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send em
On Apr 10, 11:16 am, qwanta wrote:
> I am setting a variable value that in app_controller beforeFilter, and
> I would like to access it in all child controllers beforeFilter
> function.
>
> class AppController extends Controller {
> var $components = array('Auth');
> var $uses = array('User')
OK, nevermind. Sure enough the second I post, I come up with a
solution (after struggling all morning on the problem).
class AppController extends Controller {
var $auth_role;
}
then refer to it as $this->auth_role in all controllers.
On Apr 10, 11:16 am, qwanta wrote:
> I am setting a variab
I am setting a variable value that in app_controller beforeFilter, and
I would like to access it in all child controllers beforeFilter
function.
class AppController extends Controller {
var $components = array('Auth');
var $uses = array('User');
$auth_id = $this->Auth->user('id');
if (