Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Error message after Forgotten Password email

    If a customer forgets their password, they go to the Forgotten Password page, enter their email address and the system sends them an email with a new password.

    The then go to the Login page, where they use the new password to log in. That works just fine. But at that point, the login page takes them back to where they were before (which is what is wanted most of the time).

    But their previous page was the Forgotten Password page, which has a security token for the old username/password pair. So it generates an error message.

    I think the best solution to this problem is to make the Forgotten Password page send the user to the home page and/or clear the security token. But I don't know how to do that. Any suggestions?

    Iain

  2. #2
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Error message after Forgotten Password email

    Hi,

    Which version of Zen Cart are you using.

  3. #3
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Error message after Forgotten Password email

    Well, as far as I'm concerned, it is 1.3.8, but the about says it is 1.3.7.1. I'm not sure why. It is possible that this site missed an update, but I doubt it.

  4. #4
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Error message after Forgotten Password email

    k,

    look in includes/modules/pages/login/header_php.php

    around about line 96 you should have

    PHP Code:
          if (sizeof($_SESSION['navigation']->snapshot) > 0) {
            
    //    $back = sizeof($_SESSION['navigation']->path)-2;
            //if (isset($_SESSION['navigation']->path[$back]['page'])) {
            //    if (sizeof($_SESSION['navigation']->path)-2 > 0) {
            
    $origin_href zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
            
    //            $origin_href = zen_back_link_only(true);
            
    $_SESSION['navigation']->clear_snapshot();
            
    zen_redirect($origin_href);
          } else {
            
    zen_redirect(zen_href_link(FILENAME_DEFAULT));
          } 

    please confirm

  5. #5
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: Error message after Forgotten Password email

    Just a note as well.

    When you login, it does not send you to the page you came from

    It sends you to the last page a 'snapshot' was made.

    Only some pages create a snapshot, mainly pages that you need to be logged in to view, such as My Account.

    Password Forgotten DOES NOT set a snapshot, so should never be redirected to from login

  6. #6
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Error message after Forgotten Password email

    The code in question seems to be:

    PHP Code:
          if (sizeof($_SESSION['navigation']->snapshot) > 0) {
            
    //    $back = sizeof($_SESSION['navigation']->path)-2;
            //if (isset($_SESSION['navigation']->path[$back]['page'])) {
            //    if (sizeof($_SESSION['navigation']->path)-2 > 0) {
            
    $origin_href zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
            
    //            $origin_href = zen_back_link_only(true);
            
    $_SESSION['navigation']->clear_snapshot();
            
    zen_redirect($origin_href);
          } else {
            
    zen_redirect(zen_href_link(FILENAME_DEFAULT));
          } 
    Seems to be identical, so I'm not sure why it acts as it does

 

 

Similar Threads

  1. v154 Password Forgotten - Error: The Email Address was not found in our records;
    By kcb410 in forum Managing Customers and Orders
    Replies: 12
    Last Post: 25 Jan 2016, 06:50 PM
  2. Forgotten Password Email
    By Lady Loza in forum General Questions
    Replies: 1
    Last Post: 24 Oct 2011, 12:46 AM
  3. Replies: 2
    Last Post: 7 Nov 2008, 03:18 AM
  4. Forgotten Password Email
    By deannasdreams in forum General Questions
    Replies: 4
    Last Post: 5 Jun 2008, 08:37 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR