If you add e logic_hook before delete like this:
PHP Code:
if($event=="before_delete"){
// ---------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------
$db = & PearDatabase::getInstance();
global $current_user;
$taeter = $current_user->id;
$query = "INSERT INTO accounts_audit (id,parent_id,date_created,created_by,field_name,data_type,before_value_string,after_value_string) ".
"VALUES (uuid(),'$focus->id',now(),'$taeter','deleted','bool','0','1');";
$result = $db->query($query, true,"Error auditing accounts.deleted: ");
}
you will see who deleted the record in the audit table.
Bookmarks