mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Registration is almost done, coppa support is in..
git-svn-id: file:///svn/phpbb/trunk@129 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1ccf0a5b17
commit
c11d9105d7
2 changed files with 41 additions and 3 deletions
|
@ -194,7 +194,6 @@ $l_version = "Version";
|
|||
|
||||
// Register
|
||||
$l_accountinactive = "Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Pease check your email for further information.";
|
||||
$l_coppa = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br>$l_mailingaddress<br>Or fax it to: <br>$l_faxinfo<br> Once this information has been recived your account will be activated by the administrator and you will recive and email notification.";
|
||||
$l_acountadded = "Thank you for registering with $sitename. Your account has been successfully created.";
|
||||
$l_nowactive = "Your account is now been activated. You may login and post with this account. Thank you for using $sitename forums.";
|
||||
$l_notfilledin = "Error - you did not fill in all the required fields.";
|
||||
|
@ -216,7 +215,7 @@ $l_faxinfo = "
|
|||
<br>
|
||||
Fax Number: +1-604-742-1770<br>
|
||||
";
|
||||
|
||||
$l_coppa = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br>$l_mailingaddress<br>Or fax it to: <br>$l_faxinfo<br> Once this information has been recived your account will be activated by the administrator and you will recive and email notification.";
|
||||
$l_welcomesubj = "Welcome to $sitename Forums";
|
||||
$l_welcomemail =
|
||||
"
|
||||
|
|
|
@ -77,8 +77,32 @@ switch($mode)
|
|||
|
||||
if(isset($submit) && !$error)
|
||||
{
|
||||
// The AUTO_INCREMENT field in MySQL v3.23 dosan't work correctly when there is a row with
|
||||
// -1 in that field so we have to explicitly get the next user ID.
|
||||
$sql = "SELECT max(user_id) AS total FROM users";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$user_id_row = $db->sql_fetchrow($result);
|
||||
$new_user_id = $user_id_row["total"] + 1;
|
||||
unset($result);
|
||||
unset($user_id_row);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(DEBUG)
|
||||
{
|
||||
$db_error = $db->sql_error();
|
||||
error_die($db, GENERAL_ERROR, "Error getting next user ID.<br>Reason: ".$db_error["message"]."<br>Line: ".__LINE__."<br>File: ".__FILE__);
|
||||
}
|
||||
else
|
||||
{
|
||||
error_die($db, QUERY_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
$md_pass = md5($password);
|
||||
$sql = "INSERT INTO ".USERS_TABLE." (
|
||||
user_id,
|
||||
username,
|
||||
user_regdate,
|
||||
user_password,
|
||||
|
@ -103,6 +127,7 @@ switch($mode)
|
|||
user_active,
|
||||
user_actkey)
|
||||
VALUES (
|
||||
$new_user_id,
|
||||
'".addslashes($username)."',
|
||||
'".time()."',
|
||||
'$md_pass',
|
||||
|
@ -144,15 +169,29 @@ switch($mode)
|
|||
else if($coppa)
|
||||
{
|
||||
$msg = $l_coppa;
|
||||
$email_msg = $l_welcomecoppa;
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = $l_accountadded;
|
||||
$email_msg = $l_welcomeemail;
|
||||
}
|
||||
mail($email, $l_welcomesubj, $email_msg, "From: $email_from\r\n");
|
||||
if(!$coppa)
|
||||
{
|
||||
mail($email, $l_welcomesubj, $email_msg, "From: $email_from\r\n");
|
||||
}
|
||||
error_die($db, GENERAL_ERROR, $msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = TRUE;
|
||||
$err = $db->sql_error();
|
||||
$error_msg = "Query Error: ".$err["message"];
|
||||
if(DEBUG)
|
||||
{
|
||||
$error_msg .= "<br>Query: $sql";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if($error)
|
||||
|
|
Loading…
Add table
Reference in a new issue