The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Getting Member list + adding user.
Ok, so I've got the task of adding new members to our vB forum from an account we already have in our system. I figured the API would be where to start, but it's confusing my brain for some reason on how to use it at all.
Does anyone have any good examples of a complete php script that can do the above two things: get member list add member I'm also willing to use another method as I have not gotten any API code working yet. |
#2
|
|||
|
|||
No one has any input on this?
|
#3
|
||||
|
||||
Have you tried looking in our articles forums? I'm pretty sure there are a couple of articles on adding users there.
|
#4
|
|||
|
|||
I saw one on this for v3 that didn't include any of the basic code to get connected to the API in the first place and it was also not for v4 so I dunno what would transfer over once i actually could get API output.
Basically if someone could show me how what to post to api.php via get to start using the API methods, I'm sure I could manage the rest. There are methods listed for listing the users and for registering them. I'm mostly confused on the getting started part. |
#5
|
||||
|
||||
The API for creating a user in vb3 is probably not much different than creating a new user in vb4.
|
#6
|
|||
|
|||
If I were going to do what you described, I think I would look at admincp/user.php for the code that gets executed when a user is added from the admincp. It's this section, starting around line 980:
Code:
// ###################### Start do update ####################### if ($_POST['do'] == 'update') It's basically Code:
$userdata =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); $userdata->adminoverride = true; $userdata->set('something', $somevalue); // etc, etc $newuserid = $userdata->save(); As far as I know there is no documentation of everything you can set() (although there may be an article somewhere), but I believe they mostly match the columns in the user table (and you can figure things out by comparing the admincp form fields to what gets set in user.php). |
#7
|
|||
|
|||
I just went ahead and access the database directly for this and it worked fine.
Selected all the records, then parsed through them to find the settings I needed and now I can add users directly to the dbs easily. Thanks for help. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|