From c7a949f04f2fea5f75d06d749092355dc95f010f Mon Sep 17 00:00:00 2001 From: Naglfar Date: Wed, 6 May 2020 23:00:27 +0200 Subject: [PATCH] Verify the form data and proceed if applicable --- includes/signup.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/signup.php b/includes/signup.php index f386383..1cbf188 100644 --- a/includes/signup.php +++ b/includes/signup.php @@ -19,19 +19,19 @@ Email Address: $email Interest: $interest Pubkey: $pubkey"; -if ( $tv != "tildeverse" ) { - print "Spam attempt"; - header("Location: $site_root/?page=success1"); - die(); -} - -mail($destination_addr, $subject, $mailbody, $from); - // In the future, here, we *should* be able to build a process that // somehow auto-verifies the user, and instead of email, it'll kick off the new user process here +$success = 'success2'; -header("Location: $site_root/?page=success2"); +// Spam attempt +if ( $tv != "tildeverse" ) + $success = 'success1'; +// Success! +if ( $success == "success2" ) + mail($destination_addr, $subject, $mailbody, $from); + +header("Location: $site_root/?page=$success"); die(); ?>