From 28e7d78de1eff7ad63ed68662fce46a03f7ab723 Mon Sep 17 00:00:00 2001 From: Krehan Tim Date: Fri, 9 Nov 2018 13:21:34 +0100 Subject: [PATCH] implemented user class --- cont/settings.php | 13 +++++-------- php/classes.user.php | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 php/classes.user.php diff --git a/cont/settings.php b/cont/settings.php index 07f0079..bf6f020 100644 --- a/cont/settings.php +++ b/cont/settings.php @@ -2,19 +2,16 @@

Settings

query($query); - $user = $result->fetch_assoc(); + include $_SESSION["docroot"].'/php/classes.user.php'; + $user = new user($_COOKIE["token"]); ?>

User

- Benutzername"> - Email"> - Letzter Login + Benutzername + Email + Letzter Loginlast_login; ?>
diff --git a/php/classes.user.php b/php/classes.user.php new file mode 100644 index 0000000..ac6cd03 --- /dev/null +++ b/php/classes.user.php @@ -0,0 +1,15 @@ +query($query); + $user = $result->fetch_assoc(); + $this->uid = $user["uid"]; + $this->username = $user["username"]; + $this->email = $user["email"]; + $this->last_login = $user["last_login"]; + } + } +?>