diff options
| author | Carson Fleming <cflems@cflems.net> | 2017-02-28 17:37:57 -0500 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2017-02-28 17:37:57 -0500 |
| commit | a8f3669b4ea82f48edbca69742364adf2794e07f (patch) | |
| tree | b2668a0a31623a578a16622a5da6b0c924b3c071 /dash/settings.php | |
| parent | 3bfe03a6f6136947eb8b9c714306d080ce889af7 (diff) | |
| download | bulletin-a8f3669b4ea82f48edbca69742364adf2794e07f.tar.gz | |
Modularized email and hashing
Diffstat (limited to 'dash/settings.php')
| -rw-r--r-- | dash/settings.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dash/settings.php b/dash/settings.php index b27122d..fcd9a0f 100644 --- a/dash/settings.php +++ b/dash/settings.php @@ -6,10 +6,10 @@ global $b_config, $b_user; $title = 'Account Settings / Bulletin'; require('header.php'); 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 ($b_user['password'] != bulletin_hash($_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.'); - $db->query('UPDATE users SET password = \''.hash('sha512', $_POST['newpass1']).'\' WHERE id = '.$b_user['id']) or dash_fatal($db->error); + $db->query('UPDATE users SET password = \''.bulletin_hash($_POST['newpass1']).'\' WHERE id = '.$b_user['id']) or dash_fatal($db->error); if ($db->affected_rows < 1) dash_fatal('Your password could not be changed.'); } |
