public function deleteEntry($upID) { $up = new UserPointEntry(); $up->load($upID); $up->Delete(); $this->redirect('/dashboard/users/points/', 'entry_deleted'); }
public function get($items = 0, $offset = 0) { $resp = parent::get($items, $offset); $entries = array(); foreach ($resp as $r) { $up = new UserPointEntry(); $up->load($r['upID']); $entries[] = $up; } return $entries; }
public function deleteEntry($upID) { if (!\Core::make('helper/validation/token')->validate('delete_community_points')) { $this->error = new Error(); $this->error->add('Invalid Token'); $this->view(); return; } $up = new UserPointEntry(); $up->load($upID); $up->Delete(); $this->redirect('/dashboard/users/points/', 'entry_deleted'); }