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 | |
| parent | 3bfe03a6f6136947eb8b9c714306d080ce889af7 (diff) | |
| download | bulletin-a8f3669b4ea82f48edbca69742364adf2794e07f.tar.gz | |
Modularized email and hashing
Diffstat (limited to 'dash')
| -rw-r--r-- | dash/dash_functions.php | 2 | ||||
| -rw-r--r-- | dash/profile.php | 4 | ||||
| -rw-r--r-- | dash/settings.php | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/dash/dash_functions.php b/dash/dash_functions.php index 2d01973..998455d 100644 --- a/dash/dash_functions.php +++ b/dash/dash_functions.php @@ -76,6 +76,6 @@ function app_trigger ($responseid) { 'seekereml' => $uinfo['email'], 'seekerid' => $appinfo['seeker'], ); - mail($appinfo['email'], '"'.$appinfo['title'].'" Has Received a Response', tpl($options, 'app_eml.tpl'), "From: ".$b_config['mail_from']."\r\nContent-type: text/html"); + bulletin_mail($appinfo['email'], '"'.$appinfo['title'].'" Has Received a Response', tpl($options, 'app_eml.tpl')); } ?> diff --git a/dash/profile.php b/dash/profile.php index 00764f7..de9d562 100644 --- a/dash/profile.php +++ b/dash/profile.php @@ -69,9 +69,9 @@ $phonelink = '+'.preg_replace('/[^0-9]/', '', $user['phone']); $usepropic = ''; if ($_POST['email'] != $b_user['email']) { $deactivate = ', active = 0'; - mail($_POST['email'], 'Verify Your Bulletin Email', eml_tpl(array( + bulletin_mail($_POST['email'], 'Verify Your Bulletin Email', tpl(array( 'activation_vars' => 'uid='.$b_user['id'].'&key='.$b_user['session'], - )), "From: ".$b_config['mail_from']."\r\nContent-type: text/html") or dash_fatal('We couldn\'t send mail to your new email address, so your profile has not been updated.'); + ), 'changed.tpl')) or dash_fatal('We couldn\'t send mail to your new email address, so your profile has not been updated.'); } if (!empty($_FILES['picture']['tmp_name'])) { $usepropic = ', picture = id'; 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.'); } |
