diff --git a/checkin_notes b/checkin_notes index f6e97ac813..8ae965802b 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5899,3 +5899,14 @@ Karl 2003/08/21 boinc_api.C boinc_api.h windows_opengl.C + +David Aug 21 2003 + - added administrative function for adding accounts + (even if account creation is disabled in config) + - html_ops can now refer to project-specific stuff (e.g. PROJECT) + - removed include of db.inc in html_user/util.inc. + This lets you use util.inc from html_ops + + html_ops/ + create_account_form.php (new) + create_acction_action.php (new) diff --git a/html/ops/create_account_action.php b/html/ops/create_account_action.php new file mode 100644 index 0000000000..9d16f374c9 --- /dev/null +++ b/html/ops/create_account_action.php @@ -0,0 +1,43 @@ + + require_once("util_ops.inc"); + require_once("../html_user/util.inc"); + + db_init(); + $email_addr = $_GET["email_addr"]; + + // 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(); + } + + $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 +" +); + +?> diff --git a/html/ops/create_account_form.php b/html/ops/create_account_form.php new file mode 100644 index 0000000000..a867b6c9f5 --- /dev/null +++ b/html/ops/create_account_form.php @@ -0,0 +1,18 @@ + +// use this to create accounts while regular account creation is disabled + +require_once("util_ops.inc"); + +echo " +
Browse database: