From cca9797f4e651b15dc552ef85d77ab40283d42f8 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Oct 2023 23:51:51 +0100 Subject: [PATCH] umgehen? --- web/inc/classes/Model.class.php | 2 +- web/pages/profile/controller.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web/inc/classes/Model.class.php b/web/inc/classes/Model.class.php index 2004426..21e7926 100644 --- a/web/inc/classes/Model.class.php +++ b/web/inc/classes/Model.class.php @@ -197,7 +197,7 @@ class Model { } if ($required && strlen($value) == 0) { - throw new Exception($this->dbTable . "." . $key . " is required but is set to '$value'"); + throw new Exception($this->dbTable . "." . $key . " is required"); } if ($value == null) continue; diff --git a/web/pages/profile/controller.php b/web/pages/profile/controller.php index c8ea630..81a6ace 100644 --- a/web/pages/profile/controller.php +++ b/web/pages/profile/controller.php @@ -14,6 +14,7 @@ class Profile extends Page { { $error = false; + $_SESSION['user']->load(); $_SESSION['user']->data['firstname'] = trim($_REQUEST['firstname']); $_SESSION['user']->data['lastname'] = trim($_REQUEST['lastname']); //$_SESSION['user']->data['email'] = $_REQUEST['email'];