/** * Method to load the users in the system * * @return void */ function _loadUsers() { $this->_users = TableUser::getUsers(); }
function removeUser() { // Check for request forgeries JRequest::checkToken() or jexit('Invalid Token'); if (!JEVHelper::isAdminUser()) { $msg = "Not Authorised"; $link = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=user.list', false); $this->setRedirect($link, $msg); return; } $model = $this->getModel('user'); $users = TableUser::getUsers($this->cid); $countdeleted = 0; foreach ($users as $user) { $countdeleted += $user->delete() ? 1 : 0; } if ($countdeleted = count($users)) { $msg = JText::_('USERS_DELETED'); } else { $msg = JText::_('NOT_ALL_USERS_DELETED'); } $link = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=user.list', false); $this->setRedirect($link, $msg); }