redirect('index.php?option=com_k2&view=usergroup&cid='.$cid[0]); } function add() { $mainframe = JFactory::getApplication(); $mainframe->redirect('index.php?option=com_k2&view=usergroup'); } function remove() { JRequest::checkToken() or jexit('Invalid Token'); $model = $this->getModel('userGroups'); $model->remove(); } }