way to update sessions?

Discussion in 'Customization & add-ons' started by jasondavis, Jan 19, 2005.

  1. jasondavis

    jasondavis New Member

    Joined:
    Aug 1, 2003
    Messages:
    85
    Is there a way to update the sessions without closing all browser windows and going back to the site?

    example; say I have a field in amember DB called saluted and it value is set to NO unless they salute. So now i'm logged in and I display "Not Saluted" and I go and salute so now im saluted but the sessions for every page would still say not saluted until I restart my web browser
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    There is a way to do this if your PHP page when you display value is protected with php_include plugin.
    Edit file
    amember/plugins/protect/php_include/check.inc.php
    and remove lines:
    if (@$HTTP_SESSION_VARS['_amember_login'] &&
    @$HTTP_SESSION_VARS['_amember_pass'] &&
    array_intersect((array)$HTTP_SESSION_VARS['_amember_product_ids'],
    (array)$_product_id)){
    return;
    }
  3. jasondavis

    jasondavis New Member

    Joined:
    Aug 1, 2003
    Messages:
    85
    works perfect, is there any disadvantages from removing that code though?
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    It may affect performance of your site, because access permissions will be checked in database for each page access, not only first time.

Share This Page