public function __actionDelete($role_id = null, $redirect = null, $purge_members = false) { if (array_key_exists('delete', $_POST['action'])) { if (!$role_id) { redirect(extension_Members::baseURL() . 'roles/'); } if ($role_id == Role::PUBLIC_ROLE) { return $this->pageAlert(__('The Public role cannot be removed'), Alert::ERROR); } if (!($existing = RoleManager::fetch($role_id))) { throw new SymphonyErrorPage(__('The role you requested to delete does not exist.'), __('Role not found')); } // @todo What should happen to any Members that had this Role? RoleManager::delete($role_id, $purge_members); if (!is_null($redirect)) { redirect($redirect); } } }