From 6d5817df8ee7ad7ebdf6412726f4e402e0c09198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 9 Apr 2023 02:29:23 +0200 Subject: [PATCH] make it possible to modify personal user data fields --- src/Controller/UserController.php | 5 +++++ views/account/account.php | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index f8c1f36..89d4df2 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -181,6 +181,11 @@ class UserController implements ISecured $user->setPlainPassword($newPassword); } + $user->setFullName($this->request->post('full_name')); + $user->setNickname($this->request->post('nickname')); + $user->setPhone($this->request->post('phone')); + $user->setIdNumber($this->request->post('id_number')); + $this->pdm->saveToDb($user); $this->request->session()->delete('authenticated_with_google_until'); diff --git a/views/account/account.php b/views/account/account.php index 723094f..69b3f44 100644 --- a/views/account/account.php +++ b/views/account/account.php @@ -5,7 +5,7 @@ @section(main)

Account

-
+

Please confirm your identity with your password or with Google to modify your account.

@@ -27,6 +27,11 @@ +
+ + + +