The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Manually create user
hi!
I'm trying to connect my wordpress users with the vB forum, what I want is when a user is created on the WP site to automatically create a forum user with the same login, email and password. I was using the method from this ancient thread: https://vborg.vbsupport.ru/showthread.php?t=82836 which seemed to work when creating the user, but I cannot set the password as I get the "Field password is not defined in validfields in class..." error. I then looked at the validfields array in vb/datamanager/user.php field and couldn't find a password field, of course. The closest thing I could think of was the 'secret' field, but that is set as not required and though it creates the user without errors I can't login because of the "invalid_password_scheme" error on login. What is the best way to create a user via PHP? Thanks in advance, cheers! |
#2
|
||||
|
||||
Checkout these docs for vB_Api_User::save. http://www.k5bp.com/docs/VB5.1.10/classv_b___api___user.html#a317a9e87ccde4e7f730f40 45e6015b3e
|
Благодарность от: | ||
MarkFL |
#3
|
|||
|
|||
Hey Replicant, thanks a lot for the reply!
I got it to work but got the error: "humanverify_missing" My code: Code:
$userApi = vB_Api::instance('user'); $userid = $userApi->save( 0, $new_pass, array( 'username' => $user->user_login, 'email' => $user->user_email, ), array(), array(), array() ); |
#4
|
||||
|
||||
I got the same error when I was playing with it, but don't remember what I did to get around it. I'll have to find my notes.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|