vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   user import problem (https://vborg.vbsupport.ru/showthread.php?t=40368)

sledgeboy 06-27-2002 11:57 PM

user import problem
 
Hi i´ve just imported 9000 users from our old database (using version 2.0.3 ) to our new one (2.2.6). Everthing worked perfect but no user can log on anymore because there is a new table called "useractivation" but this table isn´t n the old database. so i think the boarb thinks that all those users haven´t activated their account yet, so how can i make the board accept those users and see them as activated ? Please answer quickly it´s very important for us to hold the board online and working !

And please forgive my bad english, i´m not from the US and it isn´t as good as well !

Greetings

Sledge

scsa20 06-28-2002 06:24 AM

actuly, if I remember reading around the board, 2.0.3 never encripted user passwords, but in 2.2.x it did...so what you might have to do is change all the users password and e-mail it to them asking them to change it right away (one way is just change there password to there userid number and do a mulit-email to all your users using that one code that shows there userid number as there password).

Xenon 06-28-2002 10:45 AM

write a small script to encrypt ther pws automatically:

[php]
<?php
require('./global.php');
for($i=2;$i<=9000;$i++) {
$info=$DB_site->query_first("SELECT userid,password FROM user WHERE userid='".$i."');
if($info[userid]==$i) $DB_site->query("UPDATE user SET password='".md5($info[password])."' WHERE userid='".$i."');

}
?>

replace the 9000 with the highest userid you have

Admin 06-28-2002 11:00 AM

Quote:

Originally posted by Xenon
write a small script to encrypt ther pws automatically:

PHP Code:

<?php
require('./global.php');
for(
$i=2;$i<=9000;$i++) {
$info=$DB_site->query_first("SELECT userid,password FROM user WHERE userid='".$i."');
if(
$info[userid]==$i$DB_site->query("UPDATE user SET password='".md5($info[password])."' WHERE userid='".$i."');

}
?>

replace the 9000 with the highest userid you have

Ouch man, that'll cause 18,000 queries a large headache to your host! :)

PHP Code:

<?php
require('./global.php');
$DB_site->query('UPDATE user SET password=MD5(password)');
echo 
'Yes, we did it!';
?>

Unless you have a terribly old version of MySQL which doesn't support the MD5() function.

Xenon 06-28-2002 11:21 AM

hehe, hosts just want to have fun ;)

i didn't know that MD5 is also an MySQL-included function.
thank, learning never ends :)


All times are GMT. The time now is 07:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01216 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete