Zen Cart Logo
Forums / All Other Contributions/Addons / Reset customer password from admin

Reset customer password from admin

Views: 31,017

Results 21 to 40 of 60
19 Aug 2012, 6:32 AM
#21
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,806
Plugin Contributions:
15

Reset customer password from admin

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.

5 Dec 2012, 7:39 AM
#22
badbod avatar

badbod

New Zenner

Join Date:
Mar 2011
Posts:
5
Plugin Contributions:
0

Re: Reset customer password from admin

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

after the line:

$action = (isset($_GET['action']) ? $_GET['action'] : '');

add:

$searchemail = (isset($_POST['email']) ? $_POST['email'] : '');

after the line (around line 80) :

<td class="pageHeading"><?php echo PASSCHANGE_HEADING_TITLE; ?></td>

add:

<td class="pageHeading">Search email <form action='' method=post><input type=text name=email><input type=submit></form></td>

Around line 98 :

    $passchange_query_raw = "select customers_id, customers_lastname, customers_firstname, customers_email_address from $passchangeCust order by customers_id";

replace with:

  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:

5 Dec 2012, 7:54 AM
#23
badbod avatar

badbod

New Zenner

Join Date:
Mar 2011
Posts:
5
Plugin Contributions:
0

Re: Reset customer password from admin

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

after the line:

$action = (isset($_GET['action']) ? $_GET['action'] : '');

add:

$searchemail = (isset($_POST['email']) ? $_POST['email'] : '');
$searchemail = zen_db_prepare_input($searchemail);
5 Dec 2012, 8:04 AM
#24
badbod avatar

badbod

New Zenner

Join Date:
Mar 2011
Posts:
5
Plugin Contributions:
0

Re: Reset customer password from admin

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.

21 Jan 2014, 8:30 PM
#25
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

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??

21 Jan 2014, 9:30 PM
#26
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

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).

21 Jan 2014, 9:55 PM
#27
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Reset customer password from admin

lat9:

There's a recently-submitted plugin Reset Client Password from Admin that might do the trick for you (I haven't used it).

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.

21 Jan 2014, 10:11 PM
#28
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Reset customer password from admin

Glad to hear that it's working for you!

27 Jan 2014, 1:33 PM
#29
akasashasha avatar

akasashasha

Zen Follower

Join Date:
Mar 2009
Location:
France
Posts:
158
Plugin Contributions:
0

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

31 Jan 2014, 8:23 AM
#30
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Reset customer password from admin

badbod:

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

after the line:

$action = (isset($_GET['action']) ? $_GET['action'] : '');

> 
> add:
> ```
$searchemail = (isset($_POST['email']) ? $_POST['email'] : '');
$searchemail = zen_db_prepare_input($searchemail);

the search don't work: it found a blank customer.

7 Apr 2014, 4:55 AM
#31
carlc avatar

carlc

New Zenner

Join Date:
Feb 2014
Location:
Oklahoma
Posts:
22
Plugin Contributions:
0

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

7 Apr 2014, 3:05 PM
#32
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Reset customer password from admin

Did you install the SQL patch ?

8 Apr 2014, 1:51 AM
#33
carlc avatar

carlc

New Zenner

Join Date:
Feb 2014
Location:
Oklahoma
Posts:
22
Plugin Contributions:
0

Re: Reset customer password from admin

That is the error I'm getting with the sql file that came with the plugin.

11 May 2014, 12:59 PM
#34
designsbytrina avatar

designsbytrina

New Zenner

Join Date:
Jul 2006
Location:
Kentucky
Posts:
34
Plugin Contributions:
0

Re: Reset customer password from admin

I'm having the same problem when I try to run the adminplacementv15.sql patch on ZC 1.5.1, I get:

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've tried changing the prefix to my db name, same error, only then it says MYDBNAME_admin_pages does not exist.

26 Jul 2014, 4:12 PM
#35
designsbytrina avatar

designsbytrina

New Zenner

Join Date:
Jul 2006
Location:
Kentucky
Posts:
34
Plugin Contributions:
0

Re: Reset customer password from admin

**Dear Jesus, FINALLY! Posting this so everyone else who has dealt with issue can fix theirs, too.

Here is the correct text for the sql**

INSERT INTO admin_pages (page_key, language_key, main_page, menu_key, display_on_menu, sort_order) VALUES ('passChange',
'BOX_TOOLS_PASSCHANGE', 'FILENAME_PASSCHANGE', 'tools', 'Y', '40');

The original one left out the space between "admin_pages" and "(page_key...)"

9 Oct 2014, 6:29 PM
#36
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: Reset customer password from admin

designsbytrina:

**Dear Jesus, FINALLY! Posting this so everyone else who has dealt with issue can fix theirs, too.

Here is the correct text for the sql**

INSERT INTO admin_pages (page_key, language_key, main_page, menu_key, display_on_menu, sort_order) VALUES ('passChange',
'BOX_TOOLS_PASSCHANGE', 'FILENAME_PASSCHANGE', 'tools', 'Y', '40');

The original one left out the space between "admin_pages" and "(page_key...)"

Thank you very much for this! After an hour of trying this was the remedy. It should probably be changed in the file before others get caught up with the same issue.

15 Mar 2015, 8:57 AM
#37
charmlt avatar

charmlt

New Zenner

Join Date:
Mar 2005
Location:
Earth
Posts:
83
Plugin Contributions:
0

Re: Reset customer password from admin

Installs on my 1.3.9h site. Admin/tools/Change Passwords appears. No search bar. I installed it on another 1.5.4 site and it works fine. Why no search box on 1.3.9h? Am I supposed to install the 1.5.* sql file for a 1.3.9h site?

15 Mar 2015, 10:32 AM
#38
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Reset customer password from admin

charmlt:

Installs on my 1.3.9h site. Admin/tools/Change Passwords appears. No search bar. I installed it on another 1.5.4 site and it works fine. Why no search box on 1.3.9h?
Best guess is that something about the 1.3.9 code is different from the 1.5.4 code such as the name of the function to call for the search box, or the sequence of some internal variables is different. I realize not a highly technical response, but see below..
charmlt:

Am I supposed to install the 1.5.* sql file for a 1.3.9h site?

The real question is shouldn't I be upgrading a 1.3.9 site to the latest version so that when the host no longer offers PHP 5.2.17 possibly later this year that the site will still operate?

23 Mar 2015, 8:42 AM
#39
hannat avatar

hannat

New Zenner

Join Date:
Oct 2009
Posts:
9
Plugin Contributions:
0

Re: Reset customer password from admin

Hi there guys,

So I installed everything fine with no errors. Installed the SQL patch too, no problem there. Searched for a customer (used my testing account) and reset my password. But the new password doesn't work. Anyone else have this issue or have a solution?

Regards, Hannat

Edit:

Using: Zen Cart v1.5.4, PHP Version 5.4.33 and my DB doesn't have prefixes

23 Mar 2015, 10:55 AM
#40
hannat avatar

hannat

New Zenner

Join Date:
Oct 2009
Posts:
9
Plugin Contributions:
0

Re: Reset customer password from admin

Ok,

I figured out that the reason it isn't changing the password is because after hitting "Submit Query" it will find the customer but when you click on "Change Password" the page that is loaded is 'blank'. The customer is no longer selected, so typing in a password there won't do anything.

Any help here?

Regards, Hannat