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.

CommentFileSizeAuthor
#5 3254798-5.patch511 bytesbobooon
#3 3254798-2.patch514 bytesbobooon
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

robphillips created an issue. See original summary.

bobooon’s picture

Status: Active » Needs review
StatusFileSize
new514 bytes
bobooon’s picture

Status: Needs review » Needs work

Just realized hook_user_cancel() is implemented but should actually be part of hook_user_delete(). Implementations of hook_user_cancel() are intended to perform non-delete operations, such as re-assigning content to user zero. I'll revise the MR and patch.

bobooon’s picture

Status: Needs work » Needs review
StatusFileSize
new511 bytes
gaurav.kapoor’s picture

@robphillips Thanks for adding this issue. Let's see if we can get any reviews as I am not much familiar with the D7 codebase. I have also started an issue for D9 version.