Last login per user

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sburb
    Junior Member
    • Mar 2018
    • 2

    Last login per user

    Hello,

    It doesn't seem possible to get the last login time per user.
    I would like to display it in the user list.
    And it could be useful to issue some reminder if someone did not connect for a long period of time, but the information does not seem to be available.
  • jurnet
    Member
    • Aug 2019
    • 35

    #2
    Hi, did you find a solution ?

    Comment

    • yuri
      Member
      • Mar 2014
      • 8829

      #3
      Hi,

      It's only possible to see Last Access on the detail view. On the right panel.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • jurnet
        Member
        • Aug 2019
        • 35

        #4
        I have made some things :
        Create a new field in contact like lastlogintime then create a mysql trigger : with :
        Code:
         
         DELIMITER $$  CREATE TRIGGER after_auth_insert AFTER INSERT ON auth_log_record FOR EACH ROW BEGIN     IF NEW.portal_id IS NOT NULL THEN         UPDATE contact SET lastlogintime = new.created_at WHERE contact.id IN (SELECT contact_id FROM user WHERE user.user_name = new.username);     END IF; END$$  DELIMITER ;

        Comment

        Working...