Changeset 369

Show
Ignore:
Timestamp:
2009-10-11 16:29:31 (2 years ago)
Author:
hannes
Message:

making sure the new post indicators aren't reset by going back to the page after login by preventing a second-time login (ticket #125)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/classes/misc/Member.php

    r365 r369  
    11601160            if ($_SESSION['pages'] == 1) { 
    11611161                // check if returning user who has saved credentials in cookie 
    1162                 if (isset($_COOKIE['sb_user']) && $_COOKIE['sb_user'] != '') { 
     1162                if ((!isset($_SESSION['memberid']) || $_SESSION['memberid'] == 0) && isset($_COOKIE['sb_user']) && $_COOKIE['sb_user'] != '') { 
    11631163                    // decrypt cookie contents 
    11641164                    $e = new Encryption(); 
  • trunk/classes/pages/Page.php

    r361 r369  
    6363        /* Have some kind of manual per-page login credentials been posted? 
    6464         * This shouldn't be checked on 'Userpanel' page, because there is a special handling of that there. */ 
    65         if ($INPUT['show'] != 'userpanel' && isset($INPUT['user']) && $INPUT['user'] != '' && isset($INPUT['password']) && $INPUT['password'] !='') { 
     65        if ((!isset($_SESSION['memberid']) || $_SESSION['memberid'] == 0) && $INPUT['show'] != 'userpanel' && isset($INPUT['user']) && $INPUT['user'] != '' && isset($INPUT['password']) && $INPUT['password'] !='') { 
    6666            if (Member::authenticate($INPUT['user'], $INPUT['password'])) { 
    6767                // authenticated for this step