event_log_track_auth does not track all user login events

Created on 24 April 2025, 1 day ago

Problem/Motivation

Login methods that bypass the user login form are not tracked by the event log. Examples:

Steps to reproduce

  1. Use drush uli to generate a one-time login link.
  2. Click the link.
  3. Go to /admin/reports/events-track.

Expected result: There is a login event in the log.
Actual result: No login event is logged.

Proposed resolution

The problem occurs because event_log_track_auth is hooking into the user_login_form to detect logins. If it instead used hook_user_login(), it should work for both standard logins through the form and for the exceptional cases noted above.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States muriqui

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