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:
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);
Re: Reset customer password from admin
Quote:
Originally Posted by
dbltoe
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.
Re: Reset customer password from admin
i still can't get this to work and i added the coding for 'prefixes' and still nothing. am i looking in the right place under admin/tools??
Re: Reset customer password from admin
There's a recently-submitted plugin Reset Client Password from Admin that might do the trick for you (I haven't used it).
Re: Reset customer password from admin
Quote:
Originally Posted by
lat9
wow - perfect - it works... seems like the same one as the one i was trying from the forum but this one has one SQL update statement and that one did not.
Re: Reset customer password from admin
Glad to hear that it's working for you!
Re: Reset customer password from admin
Hello,
I just installed the "reset password from admin" plugin on a 1.3.9h zencart shop ... the option shows under admin / tools but it did not work : i changed a password but it is still the old password that applies ... any suggestion ?
thanks
Re: Reset customer password from admin
Quote:
Originally Posted by
badbod
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);
the search don't work: it found a blank customer.
Re: Reset customer password from admin
I'm trying to setup the script also but I am running into the mySQL error.
ERROR: Cannot execute because table admin_pages(page_key, does not exist. CHECK PREFIXES!
Warning Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
I have the default zencart 1.51 and don't understand where to put whats it looking for. Can someone point me in the right direction?
Thanks