Users logins using a one-time login link are not logged

Created on 7 August 2024, 5 months ago

Problem/Motivation

When a user logs in using a one-time login link - therefor bypassing the login form - there is no trail of it.

Steps to reproduce

  • Install the module as usual
  • Enable the 'Admin Audit Trail User Authentication' submodule
  • Generate a one-time login URL for a user, for example using Drush ( e.g. drush uli --uid=1 )
  • Copy/paste the one-time login URL in the browser
  • Check the Admin audit trails page (admin/reports/audit-trail). There will be no record that the user was logged in and/or used the link

Proposed resolution

Add a hook_user_login hook, as user_login_finalize invokes \Drupal::moduleHandler()->invokeAll('user_login', [$account]).

Perhaps also differentiate this 'operation' as not just 'login' but 'login_link' ?

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇪Belgium vodde83

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024