you can not use methods/functions when declaring properties in class
use this in AppController:
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->userScope = Configure::read('User.ACTIVE');
}
--
-- Lep pozdrav, Tilen Majerle
2012/7/2 Lucas Simon Rodrigues Magalhaes <lucassrod@gmail.com>
Hello,I have a little problem in my auth component in cakePHP 2.2.I set in my bootstrap.php [1] many CONSTANTS, example,Configure::write('User.ACTIVE', 'A'); and I wanna to use this constant in my auth component, but when I used Configure::read('User.ACTIVE'), the cakePHP show-me an error:Error: syntax error, unexpected '(', expecting ',' or ';'File: E:\wamp\www\Projetos\cakephp-startup2.2\app\Controller\AppController.phpLine: 36How to read this variable?--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment