Jump to:

5452 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Semantics of Member extension memberLoggedOut()

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

Page: 1
Go to End
Author Topic: 595 Views
  • sychan
    Avatar
    Community Member
    5 Posts

    Semantics of Member extension memberLoggedOut() Link to this post

    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

    595 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.