|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-25 17:23 UTC] php at zjs dot name
[2008-01-25 19:16 UTC] Admin at hellzoneinc dot com
[2008-01-25 21:06 UTC] phpbugs at mailinator dot com
[2008-01-28 22:56 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 23:00:01 2025 UTC |
Description: ------------ Well, I am using php-nuke for my website. I've had issues w/ PHP5 before and have always gone back to PHP4 since it worked. Since the new release isn't psoted for Windows yet, I must use PHP5. Everything works fine with the user registration EXCEPT.... When the user clicks the activate link in their e-mail, it brings them to the page saying it was successful, but it's wrong. The user info gets entered into the nuke_users_temp table just fine, however when the activate script runs, it doesn't copy the info over to nuke_users as it should, but does make it through to the remove that row. PHP4 works fine with this so I figured it's a PHP5 issue, so hope this helps. Reproduce code: --------------- It's not a visual error, so here goes. Sorry for the numerous lines. function activate($username, $check_num) { global $db, $user_prefix, $module_name, $language, $prefix; $username = filter($username, "nohtml", 1); $past = time()-86400; $db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past"); $sql = "SELECT * FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'"; $result = $db->sql_query($sql); if ($db->sql_numrows($result) == 1) { $row = $db->sql_fetchrow($result); $user_password = htmlspecialchars(stripslashes($row['user_password'])); if ($check_num == $row['check_num']) { $db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_avatar_type, user_regdate, user_lang) VALUES (NULL, '".$row['username']."', '".$row['user_email']."', '$user_password', 'gallery/blank.gif', '3', '".$row['user_regdate']."', '$language')"); $result2 = $db->sql_query("SELECT user_id FROM ".$user_prefix."_users WHERE username='".$row['username']."'"); $row2 = $db->sql_fetchrow($result2); $guserid = intval($row2['user_id']); $db->sql_query("INSERT INTO ".$prefix."_bbgroups (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', '1', '0')"); $group_id = $db->sql_nextid(); $db->sql_query("INSERT INTO ".$prefix."_bbuser_group (user_id, group_id, user_pending) VALUES ('$guserid', '$group_id', '0')"); $db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'"); include("header.php"); title(""._ACTIVATIONYES.""); OpenTable(); echo "<center><b>".$row['username'].":</b> "._ACTMSG."</center>"; CloseTable(); include("footer.php"); die(); } else { include("header.php"); title(""._ACTIVATIONERROR.""); OpenTable(); echo "<center>"._ACTERROR1."</center>"; CloseTable(); include("footer.php"); die(); } } else { include("header.php"); title(""._ACTIVATIONERROR.""); OpenTable(); echo "<center>"._ACTERROR2."</center>"; CloseTable(); include("footer.php"); die(); } } Expected result: ---------------- Copy the user from nuke_users_temp to nuke_users and I believe maybe 2 other tables from what I think I'm seeing, then remove that line from nuke_users_temp. Actual result: -------------- Does not copy the user, but then removes them from nuke_users_temp as it should.