From 4449f48e83e8a8c2b4b54b148a2b6f9fd4e8175a Mon Sep 17 00:00:00 2001 From: adrireal <80281789+adrireal@users.noreply.github.com> Date: Tue, 11 May 2021 13:14:28 +0200 Subject: [PATCH] Add files via upload --- assets/php/common/user_dao.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/php/common/user_dao.php b/assets/php/common/user_dao.php index ef3783b..eea4f95 100644 --- a/assets/php/common/user_dao.php +++ b/assets/php/common/user_dao.php @@ -18,6 +18,15 @@ //Methods: + // Delete user + public function deleteUser($user_id) { + $sql = sprintf( "DELETE FROM users WHERE id = '%s'", $user_id); + + $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); + + return $resul; + } + //Encrypt password with SHA254. private function encryptPass($password){ //$password = hash('sha256', $password);