In a discussion titled ‘Can’t delete accounts’ under the Bug category, JanJoost reports being unable to delete user accounts despite the users having zero visible posts. The issue appears tied to private messages, which cannot be deleted by users — only archived — and aren’t reflected in the ‘Posts Created’ count, though they block account deletion. sam and tobiaseigen suggest checking admin tools for message deletion. neil clarifies that in current Discourse versions, private message posts should appear in the post count and be deletable via admin tools. JanJoost confirms the user has private topics and that the ‘Delete User’ button fails, even though the post count shows zero. He later discovers archived private messages still exist in downloaded data. neil advises testing deletion of individual private messages as admin — which JanJoost confirms works, though it’s tedious for active users. Eventually, JanJoost reports the issue resolved after upgrading to Discourse v2.2.0.beta4 and migrating to an SSD-based VM, eliminating deadlocks and lingering posts. He offers to run further tests if needed.
I can’t seem to delete accounts. Every time I try to delete an account I get a message saying that accounts can only be deleted when there are no posts linked with the account anymore:
However, ther user doesn’t have any posts to their name any more:
(‘Gemaakte berichten’ is Dutch for ‘posts created’)
The log doesn’t show any errors, but I still can’t delete the user. So for now we’ve anonymised all users who want their account deleted, but it would be nice if we could indeed delete the accounts completely.
Could this have to do with the fact that the users have private messages in their mailboxes? I can’t seem to delete those, just archive them.
Which version of Discourse are you on? On the current version, posts in private messages will show in the total post count in admin, and can be deleted either by using the “Delete all posts” button or the “Delete User” button.
I’ve got admin-view of the profile in front of me. Under activity it says there are 0 posts created but there are private topics created due to the fact that this user sent and received internal messages. Clicking on the orange ‘remove user’ button generates an error.
I’m sure this is related to the fact that the user still has a number of private messages in their sent/received mailbox.
When I ‘login as user’ I can’t delete those messages, as there is no option to do so. I can however click ‘archive’, but all that does is move the messages to the ‘archive’ mailbox.
When I login as the user and go to account, there’s a button ‘Delete my account’. When I click that, I get a pop-up after some waiting, that says ‘please contact a staff member if you wish your account to be deleted.’
I’m running version v.2.1.0.beta6 +46. The smiley says I’m up to date.
Hmm, interesting. I’ve anonymised the user, and when I now click on ‘download all my data’, I get a CSV which indeed contains a lot of posts. But the post count on the anonymised stats page says the user has written 0 posts.
Hi @neil, I’ve not gone in to check if I can delete one message. However, I was hoping I wouldn’t have to delete all messages individually as we have a few users who have been very active…
The ‘Posts Created’ count for the user is 0, checked in the admin UI. See also the second image in my opening post. (‘Gemaakte berichten’ is the Dutch translation of ‘Posts Created’).
Ok can you try it on only one such post? Trying to figure out what’s so special about these posts. Being in a private message isn’t special. We need more info.
Yes, but to be honest I can’t really say what it actually was that fixed it.
First of all I did upgrade the forum to the latest version at the time (2.2.0.beta4) and I built up a new VM on a machine with faster disks (SSD-based). The combination of the two has fixed it for me, no more deadlocks and no more lingering posts etc. It seems to work fine now.
If you wish I can run some tests if that’s any helpful.