![]() |
Add User Script in PHP
Hello,
Can someone guide me how to write a PHP script (for vBulletin 4.2.2) that adds a user. No verification of user required, just add the user. Thanks for your help, Peter |
Did you check the articles forum? There is an article somewhere in there on adding users.
|
This should get you started. :)
As @Lynne suggested you should search yourself for a more comprehensive search. http://www.vbulletin.com/forum/forum...emote-location https://vborg.vbsupport.ru/showthread.php?t=82836 |
Thank you Lynne and tbworld. I did see thread 82836, but was unable to run it successfully. SInce it was an old thread and I am running 4.2.2 I raised this again.
It did succeed now: I placed this script in the root directory of my vbulletin tree and it now did run, both from a url call as well as from the command line. Thanks for your patience and help. Peter <?php define('VB_AREA', 'External'); define('SKIP_SESSIONCREATE', 1); define('SKIP_USERINFO', 1); define('CWD', '/pathtomyvbulletin'); require_once(CWD . '/includes/init.php'); $newuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); $newuser->set('username', 'Auto User'); $newuser->set('email', 'myuser@email.com'); $newuser->set('password', 'verysecret'); $newuser->set('usergroupid', 2); $newuserid = $newuser->save(); ?> |
Did you go to the very last page of the thread to see users posting scripts that work with vB4.x?
|
All times are GMT. The time now is 10:03 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|