The "FIX EMPTY USER AWARD TABLE" from installation and the one inside the "update counters" dont work at all!
All users are show as guest, and... hack mess up all the forums
It only give a blank screen.
I cant make it works.
Help please
Here's the part of the misc.php with the info for the fix un the vb3_useraward table:
PHP Code:
// ###################### Start find lost users #######################
if ($_POST['do'] == 'lostusers')
{
$users = $DB_site->query("
SELECT user.userid
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield USING(userid)
WHERE userfield.userid IS NULL
");
$userids = array();
while ($user = $DB_site->fetch_array($users))
{
$userids[] = $user['userid'];
}
if (!empty($userids))
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "userfield (userid) VALUES (" . implode('),(', $userids) . ")");
}
$users = $DB_site->query("
SELECT user.userid
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield USING(userid)
WHERE usertextfield.userid IS NULL
");
$userids = array();
while ($user = $DB_site->fetch_array($users))
{
$userids[] = $user['userid'];
}
if (!empty($userids))
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "usertextfield (userid) VALUES (" . implode('),(', $userids) . ")");
}
// [START HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 2 ]
// FIX EMPTY USER AWARD TABLE
$users = $DB_site->query("
SELECT user.userid
FROM " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "useraward AS useraward USING(userid)
WHERE useraward.userid IS NULL
");
$userids = array();
while ($user = $DB_site->fetch_array($users))
{
$userids[] = $user['userid'];
}
if (!empty($userids))
{
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "useraward (userid) VALUES (" . implode('),(', $userids) . ")");
}
// [END HACK='Awards/Medals/Cards by AnimeWebby' AUTHOR='AnimeWebby' VERSION='2.0' CHANGEID= 2 ]
define('CP_REDIRECT', 'misc.php');
print_stop_message('user_records_repaired');
}
I'm using vb3.0.5 (security flaw patched)
Any idea?
Somebody can help me?