On 8/22/07, rtanz <[EMAIL PROTECTED]> wrote:
>
> hi i have this function to call the parent before filter according to
> what action is executing, however this is not working and all actions
> in my userscontroller are in fact calling this beforefilter. what is
> the problem with my code? thanks
>
>         function beforeFilter() {
>                 //$myactions = array('login', 'logout');
>                 if (!($this->action ) == 'login'|'logout')
>                         parent::beforeFilter();
>         }
>

I've never seen that notation you are using in your if statement
before.  Have you tried doing this:

if (!in_array($this->action, $myactions)) {
     parent::beforeFilter();
}

-- 
Chris Hartjes
Senior Developer
Cake Development Corporation

My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to