Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For some unholy reason, we delete all watchdog entries when a user cancels own account. Thats a security nightmare. Someone can wreak havoc and then cover all their tracks. Attached patch removes these watchdog deletes and smartens our dblog report to show rows where the uid is no longer found.
Comment | File | Size | Author |
---|---|---|---|
#7 | deleted_user.patch | 3.99 KB | jbrown |
#5 | remove_user_cancel_tests.patch | 1.83 KB | Berdir |
dblog.diff | 1.39 KB | moshe weitzman | |
Comments
Comment #1
catchI think the idea is that people can completely remove their accounts from the system, but since logs get cleared by cron, and contrib could add this hook, I agree it's madness doing it like this. Also clearing watchdog logs can be an expensive operation if there's a lot of rows so best left for cron.
Patch looks great, needs a testbot (or manual) run before commit.
Comment #2
jbrown CreditAttribution: jbrown commentedI totally agree.
Comment #3
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #4
BerdirPoor tests... everyone is forgetting these :) The attached page removes the tests that test this.
Another thing I noticed: Those events then show up as Anonymous, but link to the profile page of the deleted user. Maybe we should add something like "Deleted user (uid: 27)" instead?
Not covered by the patch, we need to get HEAD to pass again first :)
Comment #5
BerdirErm, with patch this time.
Comment #6
webchickOopsie. :P
Committed to HEAD.
Comment #7
jbrown CreditAttribution: jbrown commentedI implemented the suggestion in #4.
Comment #8
ff1 CreditAttribution: ff1 commented#7: deleted_user.patch queued for re-testing.
Comment #9
neale.wolfson CreditAttribution: neale.wolfson commentedLooks OK, but needs to match to code formatting standards (Curly brackets always and no empty lines with whitespace).
Needs a reroll for GIT.
This is still an issue in D8.
Comment #10
zaporylieThis is not an issue any more, at least I can't reproduce it. All eventual code standard problems will be solved in https://www.drupal.org/node/1518116