2004-06-09 19:15:57 +00:00
|
|
|
<?php
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util_ops.inc");
|
|
|
|
require_once("../inc/util.inc");
|
2003-08-22 05:36:25 +00:00
|
|
|
|
|
|
|
db_init();
|
2003-08-31 00:18:45 +00:00
|
|
|
$email_addr = trim($_GET["email_addr"]);
|
2003-08-22 05:36:25 +00:00
|
|
|
|
|
|
|
// see if email address is taken
|
|
|
|
$query = "select * from user where email_addr='$email_addr'";
|
|
|
|
$result = mysql_query($query);
|
|
|
|
$user = mysql_fetch_object($result);
|
|
|
|
if ($user) {
|
|
|
|
echo "That email address ($email_addr) is taken";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
$authenticator = random_string();
|
|
|
|
$munged_email_addr = munge_email_addr($email_addr, $authenticator);
|
|
|
|
$user_name = $_GET["user_name"];
|
|
|
|
$t = time();
|
|
|
|
$query = "insert into user (create_time, email_addr, name, authenticator) values ($t, '$munged_email_addr', '$user_name', '$authenticator')";
|
|
|
|
$result = mysql_query($query);
|
|
|
|
if (!$result) {
|
|
|
|
echo "couldn't create account:".mysql_error();
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2003-08-25 19:59:47 +00:00
|
|
|
echo "Account created";
|
|
|
|
|
2003-08-22 05:36:25 +00:00
|
|
|
$url = URL_BASE."/account_created.php?email_addr=".urlencode($email_addr);
|
|
|
|
mail($email_addr, PROJECT. " account created",
|
|
|
|
"This email confirms the creation of your ".PROJECT." account.
|
|
|
|
|
|
|
|
".PROJECT." URL: ".MASTER_URL."
|
|
|
|
|
|
|
|
Your account key: $authenticator\n
|
|
|
|
|
|
|
|
Please save this email.
|
|
|
|
You will need your account key to log in to the ".PROJECT." web site.
|
|
|
|
|
|
|
|
To finish registration, go to
|
|
|
|
$url
|
2003-08-31 00:13:09 +00:00
|
|
|
|
|
|
|
Please subscribe to the BOINC beta-test mail list:
|
|
|
|
https://lists.sourceforge.net/lists/listinfo/boinc-beta
|
2003-08-22 05:36:25 +00:00
|
|
|
"
|
|
|
|
);
|
|
|
|
|
|
|
|
?>
|