hello you cab'r give a function to a variable declaration.
Put it in beforeFlter:
function beforeFilter() {
$this->criteria = array('Muncipo.estado_id'=>$ths->Auth->user
('estado_id');
}
On Nov 27, 8:56 pm, jlugo <[email protected]> wrote:
> I have the fallowing code
>
> class CompromisosController extends AppController {
>
> var $name = 'Compromisos';
> var $helpers = array('Html', 'Form');
> var $uses = array('Compromiso', 'Seguimiento', 'Estado');
> var $criteria = array("Municipio.estado_id" => $this->Auth->user
> ('estado_id')); //line 8
> var $paginate = array(
> 'limit' => 20,
> 'order' => array(
> 'Compromiso.id' => 'desc'
> )
> );
>
> and it shows the error
>
> Parse error: syntax error, unexpected T_VARIABLE in /var/www/cake/
> app_pre22/controllers/compromisos_controller.php on line 8
>
> Can anyone help me please.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en