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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

Semantics of Member extension memberLoggedOut()


Go to End


1187 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