Page 1 of 2 12 LastLast
Results 1 to 10 of 209

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    help question Is a Permanent Login (Auto-Login) Possible?

    hey,

    how could it be possible to let users "stay logged in on this computer" (auto / permanent login)?

    thx

  2. #2
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Sure, you just need to set a cookie, and configure the Zen Cart login to look for it.

    http://us2.php.net/manual/en/features.cookies.php

    Then take a look at...
    • [STORE_ROOT]/includes/modules/pages/login/header.php
    • [STORE_ROOT]/includes/modules/create_account.php
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  3. #3
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    okay, that works really nice.
    but since it's so easy to modify cookies, how to make it safe?
    store the password as md5-string in the cookie?

  4. #4
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    The cookie should definitely have the PW encoded.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  5. #5
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    sorry, but WHY wouldn't you take md5-encryption for the customers password?

    zen_validate_password doesn't help any, because that function deals with the unencrypted password as value.
    in the cookie i have an md5... and the function zen_encrypt_password always produces a different string...

    how would you suggest to compare the md5-pw to the one in the db?

  6. #6
    Join Date
    Feb 2007
    Location
    Vienna
    Posts
    38
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    sorry, my mistake.

    of course i can store the password from the db in the cookie and have not to deal with this extendet encryption method

  7. #7
    Join Date
    Jan 2010
    Posts
    16
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    I installed this mod successfully. I would like to add an additional feature on the login header. If customer logged in already, i would like to display customer's first and last name follow by [Logout]. This is very similar to Welcome message on the main page, except for i would like to have it display on the header file. The benefit of it is to let customer know that his session is still active. How do i accomplish this?

    In file, /includes/languages/english/MYTEMPLATE/header.php
    I changed define('HEADER_TITLE_LOGOFF', '[Log Out]');
    to
    define('HEADER_TITLE_LOGOFF', %s[Log Out]');

    The display result shows the same. What is the actual variable to represent current user's first and last name?

  8. #8
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Quote Originally Posted by hliang View Post
    I installed this mod successfully. I would like to add an additional feature on the login header. If customer logged in already, i would like to display customer's first and last name follow by [Logout]. This is very similar to Welcome message on the main page, except for i would like to have it display on the header file. The benefit of it is to let customer know that his session is still active. How do i accomplish this?

    In file, /includes/languages/english/MYTEMPLATE/header.php
    I changed define('HEADER_TITLE_LOGOFF', '[Log Out]');
    to
    define('HEADER_TITLE_LOGOFF', %s[Log Out]');

    The display result shows the same. What is the actual variable to represent current user's first and last name?
    $_SESSION['customer_first_name']
    $_SESSION['customer_last_name']

  9. #9
    Join Date
    Dec 2005
    Location
    Kalamazoo, MI
    Posts
    65
    Plugin Contributions
    0

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Hello.

    I installed 2.01 both on a live 1.5.6A instance and a development 1.5.7. On both, the login does not seem to hold across sessions despite checking the box.
    The things I changed were the secret of course, and the cookie duration to 365 days. I thought changing the cookie duration may be the problem but this does not seem to effect things. Is there a good way to troubleshoot this?

    Thanks for the plugin.
    J.J. Meddaugh
    http://www.atguys.com

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,489
    Plugin Contributions
    88

    Default Re: Is a Permanent Login (Auto-Login) Possible?

    Quote Originally Posted by jsquared View Post
    Hello.

    I installed 2.01 both on a live 1.5.6A instance and a development 1.5.7. On both, the login does not seem to hold across sessions despite checking the box.
    The things I changed were the secret of course, and the cookie duration to 365 days. I thought changing the cookie duration may be the problem but this does not seem to effect things. Is there a good way to troubleshoot this?

    Thanks for the plugin.
    What version of PHP is in use? You can view the cookie settings using your browser's 'Developer Tools' (F12 on Windows for Firefox, Chrome and Edge) to check that the samesite attribute is being properly set.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Admin auto login for a cron job
    By Gigo in forum Customization from the Admin
    Replies: 20
    Last Post: 9 Aug 2012, 07:39 AM
  2. Is there a way to auto-login to admin?
    By mikejd in forum General Questions
    Replies: 4
    Last Post: 3 Nov 2009, 09:55 AM
  3. Auto-switching DB login to end 1226 Error
    By Camarilladee in forum Basic Configuration
    Replies: 7
    Last Post: 2 Jun 2006, 05:56 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