BUGFIX: Disable warning about PastMember cookie if contnet was sent too early.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@75223 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-04-27 05:11:52 +00:00
parent d8b22a0582
commit ef15f1a3a6

View File

@ -83,7 +83,7 @@ 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()) {
if($member = Member::currentUser()) {
Cookie::set("PastMember", true);
if(!headers_sent()) Cookie::set("PastMember", true);
DB::query("UPDATE Member SET LastVisited = NOW() WHERE ID = $member->ID", null);
}
}