I have a query that adds to users reputation automatically via mysql in the 'reputation' table (it does not modify the users table). The problem I'm having is the value on the forums doesn't update unless I manually run the "Rebuild User Reputation" in General Update Tools (admincp).
I had this same problem with user ranks not updating if I make changes directly to the sql records, what fixed it was the following:
Code:
$userdm =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT);
$userdm->set_existing($user);
$userdm->set('posts', $user['posts']); // This will activate the rank update
$userdm->save();
My question now is, how can I have the 'Rebuild User Reputation' run automatically via php so I can add it to my script that I have (prefer to have it only run just for a specified userid).
Any help would be appreciated.