neu template für änderung von benutzerdaten (in progress)

This commit is contained in:
Illia Hromovoi 2025-07-03 12:53:34 +02:00
parent 942dc3808e
commit ae3a653de4
3 changed files with 15 additions and 3 deletions

View File

@ -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();
}
}
}

View File

@ -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";
}
}

View File

@ -22,6 +22,11 @@
<input type="hidden" name="do" value="deleteAccount">
<button type="submit" class="btn btn-logout">Meinen Account löschen</button>
</form>
<form method="post">
<input type="hidden" name="controller" value="user">
<input type="hidden" name="do" value="changeAccountData">
<button type="submit" class="btn btn-logout">Meine Kontodaten ändern</button>
</form>
</div>
</div>
</div>