From 93b405ab9f69538546165c75a301c0c57a5359cf Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 26 Jul 2016 00:16:17 +0200 Subject: User authentication mechanism --- include/settings.php | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 include/settings.php (limited to 'include/settings.php') diff --git a/include/settings.php b/include/settings.php new file mode 100644 index 0000000..7dfbbc3 --- /dev/null +++ b/include/settings.php @@ -0,0 +1,84 @@ +. + */ + +require_once('./index.php'); +require_once('./login.php'); +require('./header.php'); +?> + +
+ + + + +
+
+
+

Settings

+
+ +
+ +
+
+
+
Password
+
+ The passwords don\'t match.
'; + } else if (!$_user->verifyPassword($_POST['password_current'])) { + echo '
The current password was incorrect.
'; + } else { + try { + $_user->setPassword($_POST['password_update']); + echo '
Password successfully changed.
'; + } catch (PDOException $e) { + echo '
An unknown error occurred.
'; + } + } + } + ?> +
+
+ +
+
+ +
+
+ +
+ +
+
+
+
+
+
+ + + + + + + -- cgit v1.2.3