Yeah, that's what I thought, but now I have a new problem. I made the new row and everything, but it's not really saving... Here's the PHP code I put in the index.php.
PHP Code:
if ( $vbulletin->userinfo['usergroup'] == 2 OR $vbulletin->userinfo['usergroup'] > 3 )
{
if (TIMENOW - $vbulletin->userinfo['lastrepadd'] >= 86400)
{
$reputationlevel = $db->query_first_slave("
SELECT reputationlevelid
FROM " . TABLE_PREFIX . "reputationlevel
WHERE " . $vbulletin->userinfo['reputation'] + 1 . " >= minimumreputation
ORDER BY minimumreputation
DESC LIMIT 1
");
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($vbulletin->userinfo);
$userdata->set('lastrepadd', TIMENOW);
$userdata->set('reputation', $vbulletin->userinfo['reputation'] + 1);
$userdata->set('reputationlevelid', intval($reputationlevel['reputationlevelid']));
$userdata->save();
}
}
I have added
lastrepadd to the $userinfo array. I added a row in the vb_user table called
lastrepadd. Why isn't that saving the
lastrepadd variable? What am I doing wrong?