The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Command Line Scripting - How to 'become a user'
For all you programmers out there that, like me, want to be able to automate jobs to run on-demand from the CL! I do like the data managers, but they expect $vbulletin to have the user state set. The 'hard' bit here was to figure out: how do I force $vbulletin to represent a particular user? Fortunately it turns out to be easier than I thought.
Note: you must do the normal include of global.php (at least) to get $vbulletin. E.g.: PHP Code:
PHP Code:
For instance, in my case I've added some custom userfields to represent API credentials for an MMO which they must fill in correctly at registration. I then have a cronjob to fetch all users that are registered, get their API details, fetch their MMO Avatar image and set it as their forum avatar. Easy! Hope it helps some people, I couldn't find documentation on user impersonation. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|