Version: , by Vivi Ornitier
Developer Last Online: Mar 2008
Version: Unknown
Rating:
Released: 02-20-2002
Last Update: Never
Installs: 0
No support by the author.
I've installed . . . like 20 hacks on my forums if not more and the email verification system won't work! If a new person wants to regsiter, he fills the form, it's all good, he gets the email notification, he clicks the link to verify it, but he can't login in! it says his password is wrong. I'm thinking somewhere along the lines of something being wrong with register.php in the last part of the file so someone PLEASE PLEASE PLEASE help me because after this, it'll be the end of my blasted problems! Also, i don't really wanna replace it with a unhacked register.php because all that stuff i've hacked into it won't work and only god knows how many i had in their, i definitely don't remember them all.
Btw: I posted this at vbulletin.com and they told me to come down here cause my forums hacked.
This is the last part of register.php that i currently have:
// ############################### start activate form ###############################
if ($a=="ver") {
// get username and password
if ($bbuserinfo[userid]==0) {
$bbuserinfo[username]="";
}
eval("dooutput(\"".gettemplate("activateform")."\" );");
}
// ############################### start activate ###############################
if ($action=="activate") {
if ($userinfo=$DB_site->query_first("SELECT userid FROM user WHERE username='".addslashes(htmlspecialchars($username) )."'")) {
$u=$userinfo[userid];
$a="act";
$i=$activateid;
} else {
eval("standarderror(\"".gettemplate("error_wrongus ername")."\");");
}
}
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_invalid activateid")."\");");
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_moderat euser")."\");");
} else {
// activate account
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");
if ($HTTP_POST_VARS['action']=="emailcode") {
$users=$DB_site->query("SELECT user.userid,usergroupid,username,email,password,ac tivationid FROM user LEFT JOIN useractivation ON (user.userid=useractivation.userid AND type=0) WHERE email='".addslashes(htmlspecialchars($email))."'") ;
if ($DB_site->num_rows($users)) {
while ($user=$DB_site->fetch_array($users)) {
if ($user[usergroupid]==3) { // only do it if the user is in the correct usergroup
if ($user[activationid]=="") {
// generate new one!
// delete old activation id
$DB_site->query("DELETE FROM useractivation WHERE userid='$user[userid]' AND type=0");
// make random number
mt_srand ((double) microtime() * 1000000);
$user[activationid]=mt_rand(0,100000000);
//save to DB
$DB_site->query("INSERT INTO useractivation VALUES (NULL,'$user[userid]','".time()."','$user[activationid]',0)");
}