When a user is removed from the system, no acceptance documents are removed from the database. So in a rare case when a new user with the same email address is recreated, entity legal fails to enforce acceptance, as it finds existing documents. This happens even though the user's uid is different.

The patch I am attaching introduces hook_user_delete() which removes all entities when a user is deleted.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

claudiu.cristea’s picture

Version: 7.x-1.5 » 8.x-2.x-dev
FileSize
1.2 KB

Moving to 8.x-2.x. Proving the bug.

claudiu.cristea’s picture

And the fix.

claudiu.cristea’s picture

Assigned: ivrh » Unassigned

The last submitted patch, 2: 2633040-2.test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

claudiu.cristea’s picture

Title: No documents acceptance deleted when user is deleted » Acceptance records not deleted on user removal
idimopoulos’s picture

Status: Needs review » Reviewed & tested by the community

Works as expected and is necessary for cleaning up the database.

  • claudiu.cristea committed 25ec626 on 8.x-2.x
    Issue #2633040 by claudiu.cristea, ivrh, idimopoulos: Acceptance records...
claudiu.cristea’s picture

Status: Reviewed & tested by the community » Fixed
claudiu.cristea’s picture

Fixing credits.

Status: Fixed » Closed (fixed)

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