1
jcortego
multiple passwords
  • 2008/3/28 15:09

  • jcortego

  • Just popping in

  • Posts: 16

  • Since: 2003/9/30


I have a table with 1300 users in a MySQL database, and this table has been imported from a XLS file directly to the users table of XOOPS. What I can't import, obviously, are the passwords, because they are stored encrypted. I'd like to assign all of the passwords identical to the users names, and later each user would have to change them. Is there a way to assign multiple passwords with a php code, instead of the tedious task through XOOPS Admin ?

2
Mamba
Re: multiple passwords
  • 2008/3/28 15:53

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


You could probably run some SQL script in phpAdmin to replace all the passwords with ones that you want.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
mawi27
Re: multiple passwords
  • 2008/3/28 17:49

  • mawi27

  • Friend of XOOPS

  • Posts: 103

  • Since: 2006/1/1 1


Hi jcortego,

i would try a script like this:

$member_handler = & xoops_gethandler('member');
$allusers $member_handler->getUsers();
foreach (
array_keys($allusers) as $j) {
    
$username $allusers[$j]->getVar("uname");
    
$allusers[$j]->setVar('pass'md5($username), true);
 
}


Attention: I have not tried it out - 'cause i like my passwords as they are

Marco
--
Match Dart!
Darts Ranking, News, Videos, Forum and more

4
jcortego
Re: multiple passwords
  • 2008/4/1 11:05

  • jcortego

  • Just popping in

  • Posts: 16

  • Since: 2003/9/30


Thanks a lot, Marco. I'll try the code and see what happens.

5
jcortego
Re: multiple passwords
  • 2008/4/1 11:07

  • jcortego

  • Just popping in

  • Posts: 16

  • Since: 2003/9/30


Thanks, Mamba. I'll try some code in Php Admin to see what happens...

Login

Who's Online

165 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits