Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 03-29-2007, 07:59 AM
ghostrifle ghostrifle is offline
 
Join Date: Mar 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default importing users (clean passwords)

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
Reply With Quote
  #2  
Old 03-29-2007, 08:06 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is System X?
Do you only want to import users?
How are the users stored in System X?
Reply With Quote
  #3  
Old 03-29-2007, 09:51 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you know PHP? If you do, loop each password until you have them encrypted, in the form of md5(md5($password . $salt)).
Reply With Quote
  #4  
Old 03-29-2007, 10:21 AM
ghostrifle ghostrifle is offline
 
Join Date: Mar 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well yeah,

System X is just any kind of system with clean passwords. I imported users now this way:

PHP Code:
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
Reply With Quote
  #5  
Old 03-29-2007, 11:42 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 03-29-2007, 02:03 PM
ghostrifle ghostrifle is offline
 
Join Date: Mar 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well...yeah... but how do I use the datamange to create user accounts ??
Reply With Quote
  #7  
Old 03-29-2007, 08:12 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See our Articles section.
Reply With Quote
  #8  
Old 03-30-2007, 08:49 AM
ghostrifle ghostrifle is offline
 
Join Date: Mar 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 03-30-2007, 09:39 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See the other thread you started on this.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05047 seconds
  • Memory Usage 2,235KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete