|
|
| |
1. VBulletin userdata array |
|
Reply |
|
|
 sugubat | 2009-11-21 23:14:44 |
Hello,
Thank you for posting this class.
I dont know so much about vBulletin.
So, could you give an example of array of vBulletin user data (that can be used during registration) ?
Thank you |
| |
2. Re: VBulletin userdata array |
|
Reply |
|
|
 Sam Cleaver | 2009-11-22 01:36:21 - In reply to message 1 from sugubat |
The only required values in the array for register_newuser array username, password and email. All the rest are optional. So you could have:
$userinfo = array('username'=>'exampleusername','email'=>'email@example.com','password'=>'examplepassword');
$result = register_newuser($userinfo);
if(!$result)
echo "User registered";
else
echo "Registration failed, reason: $result";
All values passed in the $userdata array are related to fields in the database, if you want to pass anymore values you can do.
Hope that helps!
|
| |
3. Re: VBulletin userdata array |
|
Reply |
|
|
 sugubat | 2009-11-22 06:47:49 - In reply to message 2 from Sam Cleaver |
| Thank you very much, Sam. |
| |
4. Re: VBulletin userdata array |
|
Reply |
|
|
 sugubat | 2009-11-22 07:35:47 - In reply to message 2 from Sam Cleaver |
hi,
even if in the class i put the right path i get an error
Call to undefined function register_newuser() in file .... []
my test.php is
(it should work even with the test arrays)
require_once('class.vbulletin-bridge.php');
$forum = new vBulletin_Bridge();
$userdata = array('username'=>'exampleusername','email'=>'email@example.com','password'=>'examplepassword');
$result = register_newuser($userinfo);
if(!$result)
echo "User registered";
else
echo "Registration failed, reason: $result"; |
| |
5. Re: VBulletin userdata array |
|
Reply |
|
|
 sugubat | 2009-11-22 07:44:44 - In reply to message 4 from sugubat |
I changed with
$result = $forum->register_newuser($userinfo); |
| |
6. Re: VBulletin userdata array |
|
Reply |
|
|
 sugubat | 2009-11-22 07:50:13 - In reply to message 5 from sugubat |
:( now for
require_once('class.vbulletin-bridge.php');
$forum = new vBulletin_Bridge();
$userdata = array(
'username'=>'exampleusername',
'email'=>'email@example.com',
'password'=>'examplepassword');
$result = $forum->register_newuser($userinfo);
if(!$result)
echo "User registered";
else
echo "Registration failed, reason: $result";
i get
Registration failed, reason: Please complete the required field "Username".
|
| |
7. Re: VBulletin userdata array |
|
Reply |
|
|
 sugubat | 2009-11-22 07:54:59 - In reply to message 6 from sugubat |
| it works now. Thank you |
| |
8. Re: VBulletin userdata array |
|
Reply |
|
|
 Sam Cleaver | 2009-11-22 11:59:23 - In reply to message 7 from sugubat |
| Sorry, wasn't around last night so missed all of the replies! Yea with the first errors you were recieving its because you werent accessing the functions through the class. With the last one did I forget to give the Username a capital letter at the start? |
| |
9. Re: VBulletin userdata array |
|
Reply |
|
|
 brad | 2010-08-31 18:07:16 - In reply to message 3 from sugubat |
hi thank you very much, but i found a problem
how can i log whith this class please? i got this error:
Severity: User Error
Message: Registry object is not an object
Filename: includes/class_dm.php
Line Number: 202
and
Fatal error: Call to a member function query() on a non-object in C:\AppServ\www\teste\vbulltin\class.vbulletin-bridge.php on line 54
|
|