On Jan 25, 5:57 pm, powtac <[EMAIL PROTECTED]> wrote:
> In the beforeFind() I delete some data of the current user which
> should only be in the database for 60 minutes.
> But when I want to take a look on the data as admin I dont want to
> delete anything...
In your model:
var $cleanup = true;
function beforeFind() {
if ($this->cleanup) {
xyz;
}
return true;
}
in your admin functions (or in the before filter if $this->['params']
['admin'] isset and is true):
$this->Model->cleanup = false;
$topQualityKnittingWear = $this->Model->find('all', array('conditions'
=> ('Model.quality' =>'top drawer')));
Or something similar,
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---