Implement hook_user_cancel() & hook_user_predelete() to delete submissions when user account is deleted

Created on 12 March 2024, 4 months ago
Updated 5 April 2024, 3 months ago

Problem/Motivation

When a user deletes their account any Webform submissions they created with that account will remain on the site, still linked to their now deleted user account.

Proposed resolution

Implement hook_user_cancel() & hook_user_predelete() to make the submissions belong to the anonymous user (if they selected "Delete the account and make its content belong to the Anonymous user.") or to delete them (if they selected "Delete the account and its content.")

User interface changes

None, the user delete UI (/user/UID/cancel) will be used.

API changes

n/a

Data model changes

n/a

✨ Feature request
Status

Needs review

Version

6.2

Component

Code

Created by

πŸ‡¬πŸ‡·Greece kostask

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024