Search

I'm trying to implement a 'last-seen' date field that should be updated after a successful login but I can't find where this might be done.

I was wondering if I needed to create a custom event to be triggered when the login is complete but I'm not sure how to attach.

Any help gratefully received.

The members extension has its own delegate that you can subscribe to within an extension driver (no need for an event, but probably a new field type). Here's the specific delegate you would want to subscribe to:

Symphony::ExtensionManager()->notifyMembers('MembersPostLogin', '/frontend/', array(
    'member_id' => $this->getMemberDriver()->getMemberID(),
    'member' => $this->getMemberDriver()->getMember()
));

If you can wait till next week I'm going to turn this into an extension for use in one of my own projects.

If you can wait till next week I'm going to turn this into an extension for use in one of my own projects.

Cool! Looking forward to this Lewis.

Lewis, you're a champ. Thank you.

Almost done, I decided to add some sort of caching mechanism whereby a cookie is stored and checked based on a setting.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details