This /could/ be related to https://trac.cakephp.org/ticket/2056
On Feb 2, 2:40 am, Fred <fb...@multiply.it> wrote: > Thanks...that is very helpful. One thing to note it looks like the > children method of a tree doesn't support callbacks of false (line 275 > of tree.php has only to recursive on the find, but no callback > passed). I will just use a find directly instead of using the children > method. > > Thanks. > > Fred > > On Feb 1, 4:33 pm, Miles J <mileswjohn...@gmail.com> wrote: > > > In your find() queries, you can add a parameter: 'callbacks' => false > > >http://book.cakephp.org/view/73/Retrieving-Your-Data > > > On Feb 1, 11:59 am, Fred <fb...@multiply.it> wrote: > > > > I am using BeforeFind in my Model to filter based on criteria for a > > > logged in user. This works great and I love how easy this is to do... > > > However, I am running into a problem. There are certain times that I > > > don't want to add the filter. For example I have a tree of company's > > > that a user is in and when I get the children of an element in the > > > tree I want everything not to have the beforeFind filter things. So > > > how do I determine what is calling beforeFind? If I could find out > > > what is calling beforeFind it would make it easy and queryData doesn't > > > contain anything. I think this is probably something easy that I just > > > cannot find in the manual. I have hacked it by saying something like: > > > if ($queryData['order'][0] == 'Company.lft asc') { > > > return $queryData; > > > } > > > This works, but it is 1) really ugly and 2) really poor coding ... how > > > do I do this correctly? > > > > Thanks. > > > Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---