tweaked signup's back

This commit is contained in:
jan6 2021-10-11 16:58:50 +03:00
parent 4e01474f84
commit b5077af00e
1 changed files with 7 additions and 1 deletions

View File

@ -19,12 +19,18 @@ Don't want to use email? contact an admin directly.</p>
}else{
$username=$_POST["username"];$email=$_POST["email"];$reason=$_POST["reason"];$sshkey=$_POST["sshkey"];
$nl="\r\n";
$message="username: ".$username.$nl."email: ".$email.$nl."reason: ".$reason.$nl.$nl."makeuser ".$username." ".$email." \"".$sshkey."\"";
$makeuser="makeuser ".$username." ".$email." \"".$sshkey."\"";
$message="username: ".$username.$nl."email: ".$email.$nl."reason: ".$reason.$nl.$nl.$makeuser;
$sent=mail("jan6@tilde.cafe","new tilde.cafe signup",$message,"From: signup");
if($sent!=True){
print("error: signup failed to send!");
}else{
print("Signup sent! (signups are usually accepted within 48 hours)");
if(file_exists("/var/signups") and is_writable("/var/signups")){
$varsignups = fopen("/var/signups", "a");
fwrite($varsignups, $makeuser."\n");
fclose($varsignups);
};
};
};
include("/var/www/tilde.cafe/inc/footer.html");