How can I set the login time-out on third-party script to match aMember?

Discussion in 'aMember Pro v.4' started by igpman, Nov 11, 2011.

  1. igpman

    igpman aMember Pro Customer

    Joined:
    Mar 17, 2010
    Messages:
    72
    The problem at the moment is users are having their aMember session expire before the third-party script session expires. When this happens and they are in the third-party script, if they click the "logout" link (which takes them to amember/logout) then aMember doesn't run any logout method and so they are not logged out of the third-party script, meaning they just stay logged in until the cookies expire.

    How can I set the expiry time of the cookies so that they run out at the same time as aMember sessions in the loginUser() function of a plugin?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    By default aMember set session lifetime to 7200 seconds. (two hours)
    So you should modify other scripts timeouts accordingly.
  3. igpman

    igpman aMember Pro Customer

    Joined:
    Mar 17, 2010
    Messages:
    72
    Thanks. Is there a way to fetch this as a variable inside an aMember plugin? That would be useful.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Check ini_get('session.gc_maxlifetime');

Share This Page