www/includes/signup.php

37 lines
1.0 KiB
PHP
Raw Normal View History

2019-07-13 15:01:11 +00:00
<?php
2019-07-13 17:34:43 +00:00
// This code is licensed under the AGPL 3 or later by ubergeek (https://tildegit.org/ubergeek)
2019-07-13 15:01:11 +00:00
include "../config.php";
$name = $_GET['contact_name'];
$email = $_GET['email_address'];
$username = $_GET['username'];
2019-07-13 16:14:59 +00:00
$interest = $_GET['interest'];
2019-07-13 15:01:11 +00:00
$pubkey = $_GET['pubkey'];
$tv = $_GET['tv'];
2019-07-13 17:24:36 +00:00
$destination_addr = "newuser@thunix.net";
2019-07-13 15:01:11 +00:00
$subject = "New User Registration";
2019-07-13 16:13:02 +00:00
$mailbody = "A new user has tried to register.
2019-07-13 15:01:11 +00:00
Username: $username
Real Name: $name
Email Address: $email
Interest: $interest
Pubkey: $pubkey";
if ( $tv != "tildeverse" ) {
print "Spam attempt";
2019-07-13 15:13:32 +00:00
header("Location: $site_root/?page=success1");
2019-07-13 15:01:11 +00:00
die();
}
2019-07-13 16:13:02 +00:00
shell_exec("echo '$mailbody' | /usr/bin/mail -s '$subject' $destination_addr ");
2019-07-13 15:01:11 +00:00
// 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
2019-07-13 15:13:32 +00:00
header("Location: $site_root/?page=success2");
2019-07-13 15:01:11 +00:00
die();
?>