The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHP - Manually inserted user account does not show on stats at bottom of home page
Hello all,
I have a script to integrate my forum with another system and I can quite happily create a new user however I have noticed it doesnt appear in the stats at the bottom and the last user is shown as the last user created through the forum admin panel. I know if I run the CRON for daily stats my user now appears. How can I get the stats to update when I create the user in my php form? Thanks and best regards to all |
#2
|
|||
|
|||
It looks like you could call function build_user_statistics() in includes/functions_databuild.php (assuming you didn't use the vB_DataManager_User() class to add your user, because then it would already be called for you).
|
#3
|
|||
|
|||
Looks like the table datastore holds that value in the userstats field.
|
#4
|
|||
|
|||
Interesting,
Do you have an example of using vB_DataManager_User() Best regards? |
#5
|
|||
|
|||
You could look at admincp/user.php, search for "Start do update". (It's the code for adding a user from the ACP). I think this line:
Code:
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_CP); creates an instance of that class. But if you did your own db writes because you didn't want to use a lot of the vbulletin code then you probably wouldn't want to use that class. |
#6
|
|||
|
|||
My custom scripts always act upon the database tables directly.
|
#7
|
|||
|
|||
Thanks.
Andy, I do most it manually but I'm not sure about updating the stats which is why is someone has a simple example I can just plop in after the insert command that would be great Open to suggestions and ideas |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|