public function execute() { $isAdmin = Api_Bo_Users::isUserAdmin($this->getUserId()); if (!$isAdmin) { throw new Exception('Only the administrator can delete networks.'); } $enid = $this->m_nid; Api_Bo_Network::deleteNetwork($enid); return true; }