Uid not updated in Workflow tables when users are deleted

Dane Powell - August 5, 2009 - 19:23
Project:Workflow
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

My understanding is that when a user is deleted, their uid should be changed to 0 throughout the database - is that correct? Workflow does not seem to respect this, so that it's possible to have invalid uids in the Workflow tables. This causes subsequent problems in other modules.

I think we should be using hook_user() to capture deletes and update deleted users' uid to 0 in all workflow tables.

#1

Dane Powell - August 24, 2009 - 23:39

I'm happy to patch this myself but I'd appreciate it if someone could let me know if this is indeed the correct solution before I go to the trouble. Thanks.

#2

jvandyk - August 25, 2009 - 13:19

I believe the original reason for this was European-style privacy laws that require data retention. But one could argue that in that case the user should not be deleted, only blocked.

#3

Dane Powell - September 12, 2009 - 17:08
Status:active» needs review

Here is a patch that takes care of this.

AttachmentSize
workflow-541088-3.patch 548 bytes

#4

Dane Powell - November 22, 2009 - 01:15
Version:6.x-1.1» 6.x-1.3

This patch works great for me, can someone review it? Or it's so simple can you just commit it?

 
 

Drupal is a registered trademark of Dries Buytaert.