View Full Version : Create Users from outside vB
Earendil
11-01-2004, 07:52 AM
With the 'new' password system.. how would I go around creating a user from outside the forum?
Like.. I have this signup form for a membersystem (which uses vBulletin's auth system) and I want that upon completion of the form a forum account is automatically created for them.
How would I do this? :rolleyes:
Check out register.php starting at this line:
// ############################### start add member ###############################
if ($_POST['do'] == 'addmember')
{
Also, vB passwords are now hashed as so:
$salt = fetch_user_salt(3);
$hashedpassword = md5(md5($_POST['password']) . $salt);
fetch_user_salt(); is defined in /includes/functions_user.php, heres the code from that file:
// ###################### Start makesalt #######################
// generates a totally random string of $length chars
function fetch_user_salt($length = 3)
{
$salt = '';
for ($i = 0; $i < $length; $i++)
{
$salt .= chr(rand(32, 126));
}
return $salt;
}
Earendil
11-02-2004, 01:48 AM
Hmm, goodie, I'll go check that out today :)
Thanks.
Michael Morris
11-03-2004, 08:47 AM
Since the function files don't do anything unless their functions are called you could just include them into your extrenal script, I think.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.