From 3bfe03a6f6136947eb8b9c714306d080ce889af7 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Tue, 28 Feb 2017 16:21:33 -0500 Subject: Omitted uimg uploads from the git repo --- dash/settings.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'dash/settings.php') diff --git a/dash/settings.php b/dash/settings.php index c17a6dd..b27122d 100644 --- a/dash/settings.php +++ b/dash/settings.php @@ -5,7 +5,7 @@ require('dash_common.php'); global $b_config, $b_user; $title = 'Account Settings / Bulletin'; require('header.php'); -if (!empty($_POST['oldpass'])) { +if (!empty($_POST['change'])) { if ($b_user['password'] != hash('sha512', $_POST['oldpass'])) dash_fatal('The password you entered does not match your current password.'); if (!empty($_POST['newpass1'])) { if ($_POST['newpass1'] != $_POST['newpass2']) dash_fatal('Your new passwords do not match.'); @@ -20,12 +20,17 @@ if (!empty($_POST['oldpass'])) { $db->query('UPDATE users SET type = \''.$type.'\' WHERE id = '.$b_user['id']) or dash_fatal($db->error); if ($db->affected_rows < 1) dash_fatal('Your account type could not be changed.'); } - dash_fatal('Account settings successfully updated.'); + + if ($_POST['notif'] != $b_user['notify']) { + $notif = is_null($_POST['notif']) ? '0' : '1'; + $db->query('UPDATE users SET notify = '.$notif.' WHERE id = '.$b_user['id']) or dash_fatal($db->error); + } + dash_fatal('Account settings successfully updated.', $b_config['base_url'].'dash/settings.php'); } ?>
-

Account Settings

+

Account Settings

Adjusting for

@@ -49,6 +54,10 @@ if (!empty($_POST['oldpass'])) {

+
+

Email Notifications

+

/>

+

-- cgit v1.2.3