Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Mass Password Change

Asked Modified Viewed 3,509 times
A
afoster
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
asked
Senior Member

For a number of reasons, I may need to change the password of each member (100) on my site. Is there an easy way for the admin to do this and then have the members change it if they want to?

If I let them do it themselves, I know that more than half of them will not do it and I need to get this done. Any suggestions/code samples would be appreciated.
0 replies

8 posts

R
rudic
R
rudic 10
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 7 threads in the forums
answered
Junior Member

I had a similar problem on one of my sites, but for me i had to create passwords for them all. from MySQL i exported the users table to xls changed the password field to the password I wanted then imported it back in. this is probally the worst way to do it, but it worked for me!.
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

First, Try this Script for your Personal E-Mail or Create a Test Account and Test it for its E-Mail address :

My Personal Website is Down today, so I couldn't tested it...!
Don't forget to change Write the Test Email Address Here with the Email of Test Account.
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<?php
require_once CLASSES."LostPassword.class.php";
$result = dbquery("SELECT user_name, user_email, user_password FROM ".DB_USERS." WHERE user_email='Write the Test Email Address Here'"wink;
$reset = new LostPassword();
while ($data = dbarray($result))
{
$reset->checkPasswordRequest($data['user_email'], $data['user_password']);
echo $data['user_name']." : ".$data['user_email']." : New Password Sent<br />";
}
?>[/syntaxhighlighter]

If it works OK, then you can Change the Query to :
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]$result = dbquery("SELECT user_name, user_email, user_password FROM ".DB_USERS." WHERE user_status=0"wink;[/syntaxhighlighter]
Remember: This Query will Send E-Mails to All the Users(i.e no of registered Users) at the same time.
0 replies
A
afoster
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
answered
Senior Member

Ankur,

I think I understand what the script will do, but I want to make sure before I do so. In testing it, the script will change the password? If so, what does it change it to. Then in reading the end of your script you mention that the script will send an email to all registered users. What email is being sent?

Merged on Jul 10 2011 at 09:07:46:
I am also getting the following error msg when running the script:

Warning: require_once(CLASSESLostPassword.class.php) [function.require-once]: failed to open stream: No such file or directory in /hermes/bosweb/web199/b1997/ipw.uname/folder/pass_reset.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'CLASSESLostPassword.class.php' (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in /hermes/bosweb/web199/b1997/ipw.uname/folder/pass_reset.php on line 2
Edited by afoster on 10-07-2011 18:07,
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Did you tried this script in a custom page ?
If running in a separate php file, then dont forget to include maincore.php file...
0 replies
A
afoster
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
answered
Senior Member

When previewing the code in a custom page, I get the following error msg:

Fatal error: Class 'PasswordAuth' not found in /hermes/bosweb/web199/b1997/ipw.fredswebp/testsite/includes/classes/LostPassword.class.php on line 20

BTW, the code worked if I changed ClassesLostPassword.class.php to lostpassword.php
0 replies
G
gh0st2k
G
Ex Senior Dev.
  • Member, joined since
  • Contributed 131 posts on the community forums.
answered
Member

He's not using PHP Fusion > 7.02.00 / v7.02.01!
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Quote

afoster wrote:

BTW, the code worked if I changed ClassesLostPassword.class.php to lostpassword.php


You may not have received the New Password Email, I think...!

So What PHPFusion version actually you are using ?
0 replies
A
afoster
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
answered
Senior Member

Here is a screen shot of the admin panel showing that I am running version 7.02.03.
www.fredswebportal.com/testsite/version.jpg


Merged on Jul 11 2011 at 14:02:53:
Anyone else have any further input on this thread? Do I have a corrupted version of php-fusion?
Edited by afoster on 11-07-2011 23:02,
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 8 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

A
A
  • Senior Member, joined since
  • Contributed 725 posts on the community forums.
  • Started 128 threads in the forums
  • Started this discussions
G
G
Ex Senior Dev.
  • Member, joined since
  • Contributed 131 posts on the community forums.
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
R
R
rudic 10
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 7 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet