Forums / General Questions / Link Forgot your password! to different location.

Link Forgot your password! to different location.

Views: 856

Results 1 to 5 of 5
6 Mar 2012, 11:23 PM
#1
ncrs_1962 avatar

ncrs_1962

New Zenner

Join Date:
Mar 2008
Posts:
12
Plugin Contributions:
0

Link Forgot your password! to different location.

I have a custom site that uses the same username and password for several different applications. It all works pretty well except that ZenCart will send someone a new password and that causes problems in other areas.

I want to direct all "Forgot your Password!" requests to a central custom page that will reset passwords in several different applications. Currently clicking on "Forgot your Password!" directs users to index.php?main_page=password_forgotten. I want to change that link to my custom link but I can't find where the link is generated from.

Anyone know where this link is set?

Thanks

6 Mar 2012, 11:52 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Link Forgot your password! to different location.

In the top of /includes/modules/pages/password_forgotten/header_php.php add a line to redirect to the other URL:

zen_redirect('http://other_url');

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Mar 2012, 2:35 AM
#3
ncrs_1962 avatar

ncrs_1962

New Zenner

Join Date:
Mar 2008
Posts:
12
Plugin Contributions:
0

Re: Link Forgot your password! to different location.

Thanks for the reply. I set it up just like this and it didn't work. I put the file in the custom folder at password_forgotten/custom/

Is that the reason it did not work?

<?php /** * Password Forgotten * * @package page * @copyright Copyright 2003-2009 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: header_php.php 14010 2009-07-31 18:28:45Z ajeh $ */ // This should be first line of the script: zen_redirect('http://www.ncrs.org/forums/register/initiate.php'); $zco_notifier->notify('NOTIFY_HEADER_START_PASSWORD_FORGOTTEN'); require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); // remove from snapshot $_SESSION['navigation']->remove_current_page();
7 Mar 2012, 2:43 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Link Forgot your password! to different location.

There's no such thing as a custom folder under password_forgotten. You'll need to edit the original file directly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Mar 2012, 2:12 PM
#5
ncrs_1962 avatar

ncrs_1962

New Zenner

Join Date:
Mar 2008
Posts:
12
Plugin Contributions:
0

Re: Link Forgot your password! to different location.

Thanks. That worked. Now on to other issues.