![]() |
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 |
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).
|
Quote:
|
Interesting,
Do you have an example of using vB_DataManager_User() Best regards? |
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. |
Quote:
|
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 |
All times are GMT. The time now is 06:56 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|