The error appear in this line:
'scope' => array('User.status' => Configure::read('User.ACTIVE')),
Em segunda-feira, 2 de julho de 2012 18h50min00s UTC-3, MaJerle.Eu escreveu:
>
> because this is php error
>
> 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
> http://majerle.eu
>
>
>
> 2012/7/2 Lucas Simon Rodrigues Magalhaes <[email protected]>
>
>> 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.php
>> Line: 36
>>
>>
>> How to read this variable?
>>
>> [1] https://gist.github.com/3035900
>>
>> --
>> 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
>> [email protected] 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
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php