Problem/Motivation

3.1.2 release brought in a new feature #3321705: Record user roles in log description for changes on user.
This new feature was removed by the fix for #3303901: TFA Support for user login event log track.

Steps to reproduce

  1. Enable event_log_track_user sub module.
  2. Update a user account by granting a new user role.
  3. Check the event log for that action. The new user role wasn't mentioned the log.

Proposed resolution

On the line 35, modules/event_log_track_user/event_log_track_user.module
https://git.drupalcode.org/project/events_log_track/-/commit/30da2a5675f...

and line 61, the user role updated is missing too.
https://git.drupalcode.org/project/events_log_track/-/commit/30da2a5675f...

The proposed solution is to change those two line back to

'description' => t('%name (%uid) as %role', [

Then the log will look like,

ELT [user] [update] ON [user/6/edit] BY [user:1:admin:authenticated] [test user (6) as authenticated]

And

ELT [user] [insert] ON [admin/people/create] BY [user:1:admin:authenticated] [test_approver (7) as authenticated,content_approver]

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

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:

  • 3346427-1 Comparechanges, plain diff MR !41
  • 3.0.x Comparecompare

Comments

Mingsong created an issue. See original summary.

mingsong’s picture

Issue summary: View changes

mingsong’s picture

Status: Active » Needs review

smustgrave made their first commit to this issue’s fork.

  • smustgrave committed 6d9d138a on 3.0.x authored by Mingsong
    Issue #3346427: Regression bug: User role changed is missing from the...
smustgrave’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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