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);