John
Tue 27th Nov '01, 9:19am
To fix this issue, please edit register.php, line 571:
Change it to:
eval("standarderror(\"".gettemplate("error_activatedthanks")."\");");
And then add a template called error_activatedthanks:
$username, you have now successfully activated your account. Please click <a href="index.php?s=$session[sessionhash]">here</a> to return to the main index.
Also, move this code:
$user=$DB_site->query_first("SELECT activationid FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
if ($i!=$user[activationid]) {
// send email again
eval("standarderror(\"".gettemplate("error_invalidactivateid")."\");");
exit;
}
// delete activationid
$DB_site->query("DELETE FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
To below this line:
if ($userinfo[usergroupid]==3) {
So you will finally get (lines 543-574):
if ($a=="act") {
// do activate account
$u = intval($u);
$userinfo=verifyid("user",$u,1,1);
if ($userinfo[usergroupid]==3) {
$user=$DB_site->query_first("SELECT activationid FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
if ($i!=$user[activationid]) {
// send email again
eval("standarderror(\"".gettemplate("error_invalidactivateid")."\");");
exit;
}
// delete activationid
$DB_site->query("DELETE FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
if ($userinfo[coppauser] or ($moderatenewmembers and !$bbuserinfo['posts'])) {
// put user in moderated group
$DB_site->query("UPDATE user SET usergroupid=4 WHERE userid='$u'");
eval("standarderror(\"".gettemplate("error_moderateuser")."\");");
} else {
// activate account
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");
$username=$userinfo[username];
eval("standarderror(\"".gettemplate("error_activatedthanks")."\");");
}
} else {
That should then solve the issues people have been having with people clicking on the links too many times.
Attached is the register.php file with the bug fixes in, if you prefer.
John
Change it to:
eval("standarderror(\"".gettemplate("error_activatedthanks")."\");");
And then add a template called error_activatedthanks:
$username, you have now successfully activated your account. Please click <a href="index.php?s=$session[sessionhash]">here</a> to return to the main index.
Also, move this code:
$user=$DB_site->query_first("SELECT activationid FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
if ($i!=$user[activationid]) {
// send email again
eval("standarderror(\"".gettemplate("error_invalidactivateid")."\");");
exit;
}
// delete activationid
$DB_site->query("DELETE FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
To below this line:
if ($userinfo[usergroupid]==3) {
So you will finally get (lines 543-574):
if ($a=="act") {
// do activate account
$u = intval($u);
$userinfo=verifyid("user",$u,1,1);
if ($userinfo[usergroupid]==3) {
$user=$DB_site->query_first("SELECT activationid FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
if ($i!=$user[activationid]) {
// send email again
eval("standarderror(\"".gettemplate("error_invalidactivateid")."\");");
exit;
}
// delete activationid
$DB_site->query("DELETE FROM useractivation WHERE userid='$userinfo[userid]' AND type=0");
if ($userinfo[coppauser] or ($moderatenewmembers and !$bbuserinfo['posts'])) {
// put user in moderated group
$DB_site->query("UPDATE user SET usergroupid=4 WHERE userid='$u'");
eval("standarderror(\"".gettemplate("error_moderateuser")."\");");
} else {
// activate account
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");
$username=$userinfo[username];
eval("standarderror(\"".gettemplate("error_activatedthanks")."\");");
}
} else {
That should then solve the issues people have been having with people clicking on the links too many times.
Attached is the register.php file with the bug fixes in, if you prefer.
John