The action you specify initially is parsed at the Dispatcher level, before anything is asked of the controller. As a result, by prepending your new action name in the before filter, all you're really changing is the value of $this->params['action'], and not the actual action that is being called by the Dispatcher.
See http://api.cakephp.org/1.2/dispatcher_8php-source.html#l00183 On Mar 26, 3:25 pm, Dan <[EMAIL PROTECTED]> wrote: > Many thanks Rob, > > Am doing pretty much what you've outlined in your second paragraph but > some extra debug should hopefully point out where cake is wandering > off ;o) > > cheers, > > D > > On Mar 26, 6:20 pm, Rob Russell <[EMAIL PROTECTED]> wrote: > > > "I don't want to use the ACL at the moment" > > > If you intend to add it later then I'd recommend just biting the > > bullet and putting ACL in now. It'll only get harder later. I found it > > pretty easy to copy my User code from an older app into my current one > > even though they're now based on 1.2 beta and the old app was 1.1 of > > course I still need to test it out to make sure things are locked > > down. You could probably find a decent tutorial to work from, user > > rights are pretty much standard across many apps. > > > As for your current question I'd check and make sure that the action > > you think is running is actually getting called. Then maybe there's > > somewhere you need to tell it which view to render instead of the one > > Cake already decided on, try just dumping the controller (set debug to > > 3 or use pr()) and see if it tells you which view it intends to render > > (I think the render() function might be the one to set that). > > > On Mar 26, 9:10 am, Dan <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I'd like to change the action on the fly on a per user type basis - I > > > don't want to use the ACL at the moment ;) > > > > Is anyone else doing this successfully? > > > > I've modified my app_controller->beforeFilter to prepend the userype > > > to the action so... > > > > controller->index > > > > would become > > > > controller->usertype_index > > > > but i'm noticing that the originally view gets called and the newly > > > modified action gets called without function parameters. > > > > I'm assuming i'm not using this as intended, but wantd to see if > > > anyone else is doing something similar? > > > > Cheers > > > > Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---