0

A user was created just over a week ago and at some point was given a particular role by an administrator. Will this update (the role given, the date/time of the update and the admin who made it) have been recorded by default in the database somewhere? I don't have any special user modules installed on the site e.g. User Revisions. When I tested just now by giving roles to a user and then looking in "recent log messages" (filtered to "user"), my update didn't show there, so I'm guessing the answer's no, but if there is a way to retrieve this info it would be helpful.

1
  • How about just "creating" a cutom logging about these kinds of events, so that at least from "now on" you have something you could use for these kinds of queries (no custom code/modules required ...). Jan 15, 2018 at 14:30

1 Answer 1

0

Unfortunately not: Changes to a user are not logged (even though newly created users are), and the user entity does not support revisions in core (as of Drupal 8.4.2).

You could add an extra submission function with hook_form_user_form_alter() that creates a log message.

1
  • Hi Christoph, thanks for the reply. Does your answer only apply to Drupal 8? I am using D7. Sorry if I didn't make that clear.
    – Thoughtcat
    Nov 22, 2017 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.