Commit 8072fe59 authored by Nigel McNie's avatar Nigel McNie
Browse files

Only set the 'send weekly updates' flag if we were able to send a request to

This is so we don't store a value that we might be ignoring when
displaying the form again.
parent b4c6c731
......@@ -72,8 +72,6 @@ function register_submit(Pieform $form, $values) {
global $SESSION;
$registrationurl = '';
set_config('registration_sendweeklyupdates', $values['sendweeklyupdates']);
$data = registration_data();
$request = array(
CURLOPT_URL => $registrationurl,
......@@ -90,6 +88,7 @@ function register_submit(Pieform $form, $values) {
else {
set_config('registration_lastsent', strtotime('now'));
set_config('registration_sendweeklyupdates', $values['sendweeklyupdates']);
$SESSION->add_ok_msg('Registation successful - thanks for registering!');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment