port back improvements from ~club
This commit is contained in:
parent
5b1cf7b57f
commit
c5aea6e866
|
@ -98,18 +98,22 @@ if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
|
|||
|
||||
// no validation errors
|
||||
if ($message == "") {
|
||||
$sshkey = trim($_REQUEST["sshkey"]);
|
||||
$makeuser = "makeuser {$_REQUEST["username"]} {$_REQUEST["email"]} \"{$sshkey}\"";
|
||||
|
||||
$msgbody = "
|
||||
username: {$_REQUEST["username"]}
|
||||
email: {$_REQUEST["email"]}
|
||||
reason: {$_REQUEST["interest"]}
|
||||
|
||||
makeuser {$_REQUEST["username"]} {$_REQUEST["email"]} \"{$_REQUEST["sshkey"]}\"
|
||||
$makeuser
|
||||
";
|
||||
|
||||
if (mail('sudoers', 'new tilde.team signup', $msgbody)) {
|
||||
echo '<div class="alert alert-success" role="alert">
|
||||
email sent! we\'ll get back to you soon (usually within a day) with login instructions! <a href="/">back to tilde.team home</a>
|
||||
</div>';
|
||||
file_put_contents("/var/signups", $makeuser.PHP_EOL, FILE_APPEND);
|
||||
} else {
|
||||
echo '<div class="alert alert-danger" role="alert">
|
||||
something went wrong... please send an email to <a href="mailto:sudoers@tilde.team">sudoers@tilde.team</a> with details of what happened
|
||||
|
|
Loading…
Reference in New Issue