mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Better generation of PastMember cookie when you have stale login info
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66888 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
89276d7852
commit
331a427796
@ -82,10 +82,11 @@ class Controller extends RequestHandler {
|
||||
|
||||
// Directly access the session variable just in case the Group or Member tables don't yet exist
|
||||
if(Session::get('loggedInAs') && Security::database_is_ready()) {
|
||||
$member = Member::currentUser();
|
||||
if($member = Member::currentUser()) {
|
||||
Cookie::set("PastMember", true);
|
||||
DB::query("UPDATE Member SET LastVisited = NOW() WHERE ID = $member->ID", null);
|
||||
}
|
||||
}
|
||||
|
||||
// This is used to test that subordinate controllers are actually calling parent::init() - a common bug
|
||||
$this->baseInitCalled = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user