/** * Delete a module from registry * @return boolean true or throws an error on failure */ public function deleteRegistry() { $db = new db(); $result = $db->delete('modules', 'module_name', $this->installInfo['NAME']); return $result; }
/** * method for killing all cookie sessions * unsets the system cookie and unsets session credentials * @param int $user_id */ public static function killAllSessions($user_id) { // only keep one system cookie (e.g. if user clears his cookies) $db = new db(); $db->delete('system_cookie', 'account_id', $user_id); setcookie("system_cookie", "", time() - 3600, "/"); unset($_SESSION['id'], $_SESSION['admin'], $_SESSION['super'], $_SESSION['account_type']); session_destroy(); }