/** * Delete * */ public function delete() { $id_user = $this->input->post('id_user'); $current_user_id = User()->getId(); if ($id_user != $current_user_id) { $affected_rows = $this->user_model->delete($id_user); if ($affected_rows > 0) { // Update role list panel $this->_reload_user_list(); $this->success(lang('ionize_message_user_deleted')); } else { $this->error(lang('ionize_message_user_not_deleted')); } } else { $this->error(lang('ionize_message_user_cannot_delete_yourself')); } }
public function delete($userIds) { $user = new User_model(); $user->delete($userIds); }
private function removeUser($uID) { $this->checkSec(); $remUser = new User_model(); if (!$remUser->loadPropertiesFromPrimaryKey($uID)) { show_error('Failed to load selected user: '******'Failed to remove user: '******'User/index'); }
/** * Suppression d'un User * @param $usridusr identifiant a supprimer */ function delete($usridusr) { User_model::delete($this->db, $usridusr); $this->session->set_flashdata('message', formatInfo('User supprime')); redirect('listusers/index'); }
/** * Delete user * * @access private * @param array $_post _POST array * @return void */ private function deleting($_post) { $msg = null; // check permission $msg = AdmUtils_helper::chk_priv_level($_SESSION['xuid'], 'users', $_post['id'], 4); if (is_null($msg)) { // do action $mod = new User_model(); $result = $mod->delete($_post['id']); // set message $msg = AdmUtils_helper::set_msg($result); // clear useless permissions if ($result[1]) { $perm = new Permission_model(); // clean permission on user $perm->deleting_by_what('users', $_post['id']); // clean user permissions $perm->deleting_by_user($_post['id']); // set what update $msg->update[] = array('element' => 'tdown', 'url' => BASE_URL . 'users', 'title' => null); } } $this->response($msg); }