Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Mar 2016, 05:54
lakhai lakhai is offline
 
Join Date: Mar 2016
Post 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://www.vbulletin.org/forum/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!
Reply With Quote
  #2  
Old 16 Mar 2016, 14:49
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Checkout these docs for vB_Api_User::save. http://www.k5bp.com/docs/VB5.1.10/classv_b___api___user.html#a317a9e87ccde4e7f730f4045e6015b3e
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #3  
Old 16 Mar 2016, 19:31
lakhai lakhai is offline
 
Join Date: Mar 2016
Hey Replicant, thanks a lot for the reply!
I got it to work but got the error: "humanverify_missing"
My code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I also looked at the documentations related to that, but still don't know how to go about creating it. Should I be using the generateToken function?
Reply With Quote
  #4  
Old 16 Mar 2016, 20:18
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
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.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
Reply


Tags
create, manual, php, user


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 23:20.

Layout Options | Width: Wide Color: