function deleteTimer($id) { global $loggedin_user; if (!isLoggedIn()) { $this->error = "User not logged in."; return false; } $timer = new SI_Timer(); if ($timer->get($id) !== FALSE) { $timer->delete(); } else { $this->error = "Error deleting timer: " . $timer->getLastError(); return false; } return TRUE; }