View Full Version : importing users (clean passwords)
ghostrifle
03-29-2007, 07:59 AM
Hi there,
I want to import users from system X into vbulletin. The passwords of the users are not encrypted.
So how can I encrypt the passwords so that they are in the format of vbulletin ??
greetings, alex
Marco van Herwaarden
03-29-2007, 08:06 AM
What is System X?
Do you only want to import users?
How are the users stored in System X?
Dismounted
03-29-2007, 09:51 AM
Do you know PHP? If you do, loop each password until you have them encrypted, in the form of md5(md5($password . $salt)).
ghostrifle
03-29-2007, 10:21 AM
Well yeah,
System X is just any kind of system with clean passwords. I imported users now this way:
function vb_add_user(&$vb_adodb,$user_id,$username,$password,$email)
{
$values = array();
array_push($values,$user_id);
array_push($values,2);
array_push($values,$username);
array_push($values,md5(md5($password . $salt)));
array_push($values,date('Y-M-d'));
array_push($values,$email);
array_push($values,'');
//$vb_adodb->debug = true;
$vb_adodb->Execute('INSERT INTO user (userid,usergroupid,username ,password,passworddate,email,salt) VALUES(?,?,?,?,?,?,?);',$values);
}
(salt is empty for me! and it works fine)
The users can log in without any problems ;) But there's one thing I noticed... the post count doesn't get increased !??
Also, the overall amount of user doesn't gets displayed in the stats... but I can see all users in the 'user overview'.
Bye,
Alex
Marco van Herwaarden
03-29-2007, 11:42 AM
Unless there is no other option, you should not do this by inserting rows into the user table manually.
Creating a new user requires more tehn only a row in the user table.
If it is a 1 time action, use ImpEx, probably using the CSV file import option. Otherwise use the vBulletin DataManagers to create the account.
ghostrifle
03-29-2007, 02:03 PM
Well...yeah... but how do I use the datamange to create user accounts ??
Marco van Herwaarden
03-29-2007, 08:12 PM
See our Articles section.
ghostrifle
03-30-2007, 08:49 AM
thanx a lot !
But I've run into the problem, that $vbulletin is null.. therefore I can't import the users. Look at this: https://vborg.vbsupport.ru/showthread.php?t=143583
Marco van Herwaarden
03-30-2007, 09:39 AM
See the other thread you started on this.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.