Page 12 of 21 FirstFirst ... 21011121314 ... LastLast
Results 111 to 120 of 209
  1. #111
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

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

    Hi lat9!

    Yes, exactly. I'm not sure why I thought my little one line of code would actually make this work.

    Turns out my testing was completely botched by the fact that I was testing isset on $_SESSION['emp_admin_login'] rather than testing whether $_SESSION['emp_admin_login'] = true...

    Wow...anyhow...

    Here's what I did to solve the issue:

    Below:
    PHP Code:
    $customers_hashed_password = (isset ($remember_info['password'])) ? $remember_info['password'] : '~~~~'
    Put:
    PHP Code:
    $emp = (isset ($remember_info['emp'])) ? $remember_info['emp'] : false


    Then Below:
    PHP Code:
    $_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id']; 
    Put:
    PHP Code:
    $_SESSION['emp_admin_login'] = $emp

    Also, as per my previous change, it should remain intact:

    After:
    PHP Code:
    'password' => md5 ($this->secret $password_info->fields['customers_password']) 
    Add:
    PHP Code:
    'emp' => $_SESSION['emp_admin_login'
    (including the comma for anyone unfamiliar of what's going on there)

    So that it looks like:
    PHP Code:
    'password' => md5 ($this->secret $password_info->fields['customers_password']), 'emp' => $_SESSION['emp_admin_login'] ); 

    Based on a previous post with a different issue (the shopping cart restore) - we need to test if $_SESSION['emp_admin_login'] isset to avoid php errors...

    So I've done this (need advice here):

    Below:
    PHP Code:
    $password_info $db->Execute ("SELECT customers_password FROM " TABLE_CUSTOMERS " WHERE customers_id = '" $_SESSION['customer_id'] . "'"); 
    Put:
    PHP Code:
    if(!isset($_SESSION['emp_admin_login']))
    {
    $_SESSION['emp_admin_login'] = false;

    Last edited by yaseent; 20 Aug 2016 at 12:52 AM.

  2. #112
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

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

    The part to avoid php errors is completely nullifying the remember me and you end up being logged out completely, don't know what I'm doing wrong there. The rest works just fine though...

    So did this,

    Change:
    PHP Code:
    'emp' => $_SESSION['emp_admin_login'
    To:
    PHP Code:
    'emp' => (isset ($_SESSION['emp_admin_login'])) ? $_SESSION['emp_admin_login'] : false 

    And remove this completely:
    PHP Code:
    if(!isset($_SESSION['emp_admin_login']))
    {
    $_SESSION['emp_admin_login'] = false;

    Last edited by yaseent; 20 Aug 2016 at 01:01 AM.

  3. #113
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

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

    So I use log in as customer, and I want to have the header of that add-on force this add-on to delete the cookie or session data? so that it forces the new log-in information to take effect... but I don't know how to do this.

    Right now as it is, if I log in as a customer, and I have a previous log-in remembered, the remembered log-in stays in effect, and the customer's account does not log-in because the previous one is still logged in.

    Any suggestions?

  4. #114
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

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

    Quote Originally Posted by wolfderby View Post
    So I use log in as customer, and I want to have the header of that add-on force this add-on to delete the cookie or session data? so that it forces the new log-in information to take effect... but I don't know how to do this.

    Right now as it is, if I log in as a customer, and I have a previous log-in remembered, the remembered log-in stays in effect, and the customer's account does not log-in because the previous one is still logged in.

    Any suggestions?
    You would have to initiae the logoff procedure. I'm not too sure, but I believe there's a notifier hook to initiate the logoff procedure with the Automatic Login. If I'm not mistaken, you could trigger the hook somewhere in the Log in as customer header. Are you familiar with coding?

  5. #115
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,466
    Plugin Contributions
    88

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

    Quote Originally Posted by yaseent View Post
    You would have to initiae the logoff procedure. I'm not too sure, but I believe there's a notifier hook to initiate the logoff procedure with the Automatic Login. If I'm not mistaken, you could trigger the hook somewhere in the Log in as customer header. Are you familiar with coding?
    Spot on, @yaseent! The Automatic Login plugin "expires" any cookie associated with the current login session upon logoff, whether that's a normal customer login, a Log In as Customer login or an Encrypted Master Password login.

    @wolfderby, if you simply add to your "login as customer" procedure to ensure that you logoff after processing that customer-related action, then the "remembered" password will be removed so that you can then log in as a different customer.

  6. #116
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

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

    I really wish that "remember me?" checkbox to be checked by default. How to do that ?

  7. #117
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

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

    I can see now in my browser settings 10 zcrm_samehash cookies for every category page. Is that normal ?

  8. #118
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

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

    This module doesn't work. I have zcrm_xxx cookies expire in 2018 but I'm not logged into my account. No error logs. Can you give me some advise where should I look for ? I really like this module and I think is helpful.

    thx

  9. #119
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,466
    Plugin Contributions
    88

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

    Quote Originally Posted by solo_400 View Post
    This module doesn't work. I have zcrm_xxx cookies expire in 2018 but I'm not logged into my account. No error logs. Can you give me some advise where should I look for ? I really like this module and I think is helpful.

    thx
    A link to the site? What version of Zen Cart? What version of PHP?

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

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

    Quote Originally Posted by lat9 View Post
    A link to the site? What version of Zen Cart? What version of PHP?
    FWIW, I just installed v1.4.2 of "Remember Me" on a fresh ZC 1.5.5e site using the responsive classic template without issue.

 

 
Page 12 of 21 FirstFirst ... 21011121314 ... 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