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.

Customising the CMS /

Semantics of Member extension memberLoggedOut()


Reply


683 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