<?php if (!defined('VB_ENTRY')) die('Access denied.'); class vB_Api_Userrank extends vB_Api { public function fetchById($rankid) { $this->checkHasAdminPermission('canadminusers'); return vB_Library::instance('userrank')->fetchById($rankid); } public function fetchAll() { $this->checkHasAdminPermission('canadminusers'); return vB_Library::instance('userrank')->fetchAll(); } public function save($data, $rankid = 0) { $this->checkHasAdminPermission('canadminusers'); return vB_Library::instance('userrank')->save($data, $rankid); } public function delete($rankid) { $this->checkHasAdminPermission('canadminusers'); vB_Library::instance('userrank')->delete($rankid); return ['success' => true]; } } 