Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2011
    Posts
    8
    Plugin Contributions
    0

    Default Call the login page with the email address and password automatically?

    Hi People,

    I need to pass the email address to the login page automatically. As a bonus I would like to pass a password to it as well.

    Let me explain.

    We create accounts for customers who phone in their orders. Many of our customers are aged so they don't have email addresses so we create false email addresses for them but they have difficulty remembering. It would be much easier using their postcode.

    For the use of telephone orders ONLY I would like to use a page to search for the customers postcode and return their email address ready to login in using the admin master password. This can of course be secured by .htaccess and/or whatever.

    That much I can and have managed to create using PHP.


    The part I can't find out how to do is to call the login page with the email address (and hopefully the master password) passed to it automatically.

    I have searched around without much success so any help would be much appreciated.

    Thanks for reading.

  2. #2
    Join Date
    Apr 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: Call the login page with the email address and password automatically?

    Upon reflection, perhaps I need to re-word my question.

    Can the email address be passed to the login page within the url something like

    <a href="[email protected]"></a>

    I realise that there are some security issues passing details in a URL like that but this would be called from a php file within Zencart so that should be less of a problem.


    Or is there some other method which would help me.


    Appreciate your reading this and any suggestion you might have.

  3. #3
    Join Date
    Apr 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: Call the login page with the email address and password automatically?

    Hi people,

    I have got a little further along.


    My Aim
    For telephone orders only.
    A separate page acceessible only by us in the office behind htaccess which will accept the input of a postcode and return the email address associated with it (if any).

    Then click a button to launch the login page with that email address already inserted in the field. (may add the master password too)



    Because I had no better idea, I wanted the email address passed to the login page within the URL like "www.website.co.uk/zencart/index.php?main_page=login&[email protected]"

    I had a problem with launching the login page with the email address already inserted and had to edit zencart/includes/templates/template_default/templates/tpl_login_default.php as follows :

    Near the top, add
    Code:
    <?php
    $var1 = $_GET["var1"]; 
    ?>
    Find this
    Code:
    echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"' );
    edit it to this
    Code:
    echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="login-email-address"' . 'value = ' . $var1 );

    That launches the page with the email already in place. Cool!

    I had to add an "if" to not add the address if there was none in the URL because otherwise it inserted a "/".

    So, the question is, is this safe?

    Can anyone see any reason not to do this ?

    Would appreciate any feedback.

    Thanks for reading.

 

 

Similar Threads

  1. v155 Password Reset Feature is Not Sending the New Password to the Correct E-mail Address
    By CollegeCommunityClub in forum General Questions
    Replies: 2
    Last Post: 6 Jan 2016, 02:40 AM
  2. Replies: 5
    Last Post: 16 Feb 2014, 05:37 PM
  3. How do I call the Username and Password of the current admin?
    By bparker in forum Basic Configuration
    Replies: 7
    Last Post: 17 Sep 2009, 05:40 PM
  4. Automatically sending username and password in welcome email?
    By jordan8201 in forum General Questions
    Replies: 2
    Last Post: 18 Dec 2008, 10:25 PM
  5. Can I remove the need for customer password? and use number instead of email address?
    By xlserret in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Jun 2008, 03:27 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