Bug report: deleting user/blanking content
Hi,
I just tried to delete an old test user while blanking content, and got the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'c from GDN_Comment c join GDN_Discussion d on c.DiscussionID = d.DiscussionID wh' at line 1|Gdn_Database|Query|delete GDN_Comment c from GDN_Comment c join GDN_Discussion d on c.DiscussionID = d.DiscussionID where d.InsertUserID = :dInsertUserID
Looks like there's an errant "c" in there for the field name to be deleted from the table.
Cheers,
Dave.
0

Comments
not a bad idea to report the version of vanilla where it occurs.
I get the same on Delete user & Blank User Content vanilla ver 2.0.18.4
Any solution for this? vanilla 2.0.18.8
This is fixed in the beta. Patch below:
--- /vanilla-core-2-0-18-8/applications/vanilla/settings/class.hooks.php +++ /vanilla20/applications/vanilla/settings/class.hooks.php @@ -92,11 +92,6 @@ ->Set('Format', 'Deleted') ->Where('InsertUserID', $UserID) ->Put(); - - // Erase the user's comments - $Sender->SQL->From('Comment') - ->Join('Discussion d', 'c.DiscussionID = d.DiscussionID') - ->Delete('Comment c', array('d.InsertUserID' => $UserID)); $Sender->SQL->Update('Comment') ->Set('Body', T('The user and all related content has been deleted.'))