diff --git a/Controller/UserController.php b/Controller/UserController.php index 286bab7..f35db59 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -180,6 +180,15 @@ class UserController{ $this->view->setDoMethodName("showUserDeleteConfirmation"); $this->showUserDeleteConfirmation(); } - + } + + public function changeAccountData(){ + $userId = $_SESSION["user_id"] ?? ""; + if($userId){ + $this->db->changeUserData($userId); + $this->setUserSession($user); + $this->view->setDoMethodName("showUserDeleteConfirmation"); + $this->showUserDeleteConfirmation(); + } } } \ No newline at end of file diff --git a/Model/UserModel.php b/Model/UserModel.php index c96c367..8099c34 100644 --- a/Model/UserModel.php +++ b/Model/UserModel.php @@ -65,8 +65,6 @@ class UserModel extends Database $sth = $pdo->prepare($sql); $sth->bindParam(":id", $id); $sth->execute(); - $sth->execute(); - // echo "Benutzer ist gelöscht"; } } \ No newline at end of file diff --git a/Views/User/showUserAccountPage.phtml b/Views/User/showUserAccountPage.phtml index 0aa43a0..d75be5b 100644 --- a/Views/User/showUserAccountPage.phtml +++ b/Views/User/showUserAccountPage.phtml @@ -22,6 +22,11 @@ +
+ + + +