Use hook_user_login to emit last login / last access messages

Created on 3 December 2024, 9 months ago

Problem/Motivation

Currently, the module is using a submit handler for the user_login_form to emit messages about the user's last login and access times.

I think it's better to use the hook_user_login hook to emit these messages - it seems like the exact perfect use case.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States sonfd Portland, ME

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @sonfd
  • πŸ‡ΊπŸ‡ΈUnited States sonfd Portland, ME

    MR !27 addresses this.

    But, I believe I see why this was done via submit handler now - if a user logs in via any method other than user_login_form, those timestamps won't be accurate, I believe they'd show the current login time. So rather than address that issue (I don't know how we would address that issue), we are only displaying them if logging in via user_login_form.

    As a result, I think this should probably be Closed (works as designed), but I'll leave it to a maintainer to make that decision.

Production build 0.71.5 2024