void callback_before_delete(mixed $callback )

This callback runs before the auto delete of the crud. It takes one parameter - the primary key value. The return value is not required for this callback.


public function user(){
    $crud = new grocery_CRUD();
    $crud->set_subject('User List');
    $crud->change_field_type('active', 'true_false');
    $output = $crud->render();
public function log_user_before_delete($primary_key)
    $user = $this->db->get('cms_user')->row();
        return false;
                                            'user_id' => $primary_key,
                                            'email' => $user->email
                                            'updated' => date('Y-m-d H:i:s')));
    return true;
Latest download
grocery CRUD Newsletter
Join our newsletter to receive our last updates and news.
* indicates required