Try this:
function beforeFilter() {
if (isset($this->params[Configure::read('Routing.admin')])) {
// things for admins
} else {
// things for not admins
}
}
On 25 Sty, 16:39, powtac <[EMAIL PROTECTED]> wrote:
> How can I avoid the execution of any before*() function in the modell
> when calling an admin function in ancontroller?
>
> Example:http://www.example.com/admin/libraries/
>
> In my Libraries-controller I have a function named admin_index().
>
> Now the beforeFind() in my model "Library" is called. But I only want
> this to be executed when called normally, not by the admin routing...
>
> How can I differ in beforeFind() how it was called?
> powtac
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---