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' ?

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release admin_audit_trail-1.0.6

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • feat: #3466551 Users authentications logins using a one-time login (ULI) link are not logged By: @vodde83
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vodde83 created an issue. See original summary.

vodde83’s picture

Status: Active » Needs review

rajab natshah made their first commit to this issue’s fork.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Title: Users logins using a one-time login link are not logged » Users authentications logins using a one-time login (ULI) link are not logged

rajab natshah’s picture

Assigned: Unassigned » s.halawani
Issue summary: View changes
Issue tags: +admin_audit_trail-1.0.5
rajab natshah’s picture

Assigned: s.halawani » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.