Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Semantics of Member extension memberLoggedOut()


Go to End


1002 Views

Avatar
sychan

Community Member, 5 Posts

5 February 2011 at 11:52am


I was looking in the Member.php code to see what callbacks were defined for logOut() and saw that memberLoggedOut seems to be called twice:

function logOut() {
Session::clear("loggedInAs");
if(self::$login_marker_cookie) Cookie::set(self::$login_marker_cookie, null, 0);
self::session_regenerate_id();

$this->extend('memberLoggedOut');

$this->RememberLoginToken = null;
Cookie::set('alc_enc', null);
Cookie::forceExpiry('alc_enc');

$this->write();

// Audit logging hook
$this->extend('memberLoggedOut');
}

Are the semantics meant to be that you should check RememberLoginToken to see if its time to do the audit logging?

Thanks,
Steve