Problem/Motivation
User role history isn't removed after permanently deleting user account(s). Possibly missing on the 8.x version but not confirmed. As data privacy laws and policies become stricter it's important to assume permanent deletion includes all identifying user information.
Proposed resolution
Implement hook_user_delete() to remove {role_watchdog} table records for the deleted user account.
Comments
Comment #3
gaurav.kapoor commentedAdded implementation in the hook entity delete to delete all the role watchdog entities created for a user whose account is getting deleted.