XF 1.5 Cleanly delete accounts via SQL

Andy.N

Well-known member
I have a handful of users that created multiple accounts when their initial attempts caused some errors.
When i tried to deleted those failed accounts, there was not any option in the ACP to remove those accounts.

It will complain that those accounts have no valid email address, no valid password, usergroup, etc.

I wonder if I can remove these account via mysql cleanly? If so, which query would be the one?
Thanks
 
Are you sure you don't now have orphaned data?

What was the original cause for the failed/corrupt accounts?
Was causing by one of the addons, can't remember which one. About a couple new registrations got affected. Once it was fixed, new registrations worked normally.
The affected accounts I couldn't delete via normal options and I'm pretty sure they didn't get far (no posts, etc) so there is no data for them.
 
Was causing by one of the addons, can't remember which one. About a couple new registrations got affected. Once it was fixed, new registrations worked normally.
The affected accounts I couldn't delete via normal options and I'm pretty sure they didn't get far (no posts, etc) so there is no data for them.

Yes, but user data is spread across multiple tables.

Check out all tables starting xf_user_ plus any from add-ons.

Liam
 
Also you have to worry about tables that will have orphaned data such as the conversation tables, xf_thread_watch, etc. Doing it through mysql seems like a really bad approach.
 
Also you have to worry about tables that will have orphaned data such as the conversation tables, xf_thread_watch, etc. Doing it through mysql seems like a really bad approach.
Is there a way to delete accounts via the interface? I can't remember.

It may be worth looking through the registration files to see what data is inserted into the database on registration then create a query to undo those entries.
 
Yes, accounts can be deleted via the ACP.

However, it sounds like that was failing due to them being incomplete/corrupt due to an add-on.
 
Top Bottom