Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23
  1. #21
    Join Date
    Mar 2011
    Posts
    4
    Plugin Contributions
    1

    Default Re: Reset customer password from admin

    Hi,
    I added a search, it is by email only.

    after the line:
    Code:
    $action = (isset($_GET['action']) ? $_GET['action'] : '');
    add:
    Code:
    $searchemail = (isset($_POST['email']) ? $_POST['email'] : '');

    after the line (around line 80) :
    Code:
    <td class="pageHeading"><?php echo PASSCHANGE_HEADING_TITLE; ?></td>
    add:
    Code:
    <td class="pageHeading">Search email <form action='' method=post><input type=text name=email><input type=submit></form></td>
    Around line 98 :
    Code:
        $passchange_query_raw = "select customers_id, customers_lastname, customers_firstname, customers_email_address from $passchangeCust order by customers_id";
    replace with:

    Code:
      if ($searchemail){
    		$passchange_query_raw = "select customers_id, customers_lastname, customers_firstname, customers_email_address from $passchangeCust WHERE customers_email_address='$searchemail'";
      }else{
    		$passchange_query_raw = "select customers_id, customers_lastname, customers_firstname, customers_email_address from $passchangeCust order by customers_id";
      }
    It is quick and dirty, does not take into account languages etc but works for me.

    Enjoy:

  2. #22
    Join Date
    Mar 2011
    Posts
    4
    Plugin Contributions
    1

    Default Re: Reset customer password from admin

    ouch, forgot the security check, the first part of the post above should read

    after the line:
    Code:
    $action = (isset($_GET['action']) ? $_GET['action'] : '');
    add:
    Code:
    $searchemail = (isset($_POST['email']) ? $_POST['email'] : '');
    $searchemail = zen_db_prepare_input($searchemail);

  3. #23
    Join Date
    Mar 2011
    Posts
    4
    Plugin Contributions
    1

    Default Re: Reset customer password from admin

    Quote Originally Posted by dbltoe View Post
    The idea in Post #7 is probably a better way BUT I would use the Encrypted Master Password mod for 1.5.0 versus the older master password mod.
    It does not work for me, using the master password for 'old password' gives 'bad old password' error. Hence the last 2 posts from me with how to add search to the excellent tool provided by Lebrand2006.

    I prefer this method anyway rather than editing core files. Makes upgrades a nightmare when you have to go find all your core file mods and apply them to upgrades.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Mass Reset Customer Passwords
    By JuxiZoza in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 3 Feb 2009, 06:18 AM
  2. password reset email issues
    By sanguisdesign in forum General Questions
    Replies: 3
    Last Post: 27 Jan 2007, 04:27 PM
  3. Customer Password Generation
    By kimhuff in forum General Questions
    Replies: 2
    Last Post: 1 Oct 2006, 06:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •