• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Cleanly delete accounts via SQL

Andy.N

Well-known member
#1
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
 

Brogan

XenForo moderator
Staff member
#4
Are you sure you don't now have orphaned data?

What was the original cause for the failed/corrupt accounts?
 

Andy.N

Well-known member
#5
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.
 

Liam W

Well-known member
#6
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
 

Daniel Hood

Well-known member
#7
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.
 

James

Well-known member
#8
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.
 

Brogan

XenForo moderator
Staff member
#9
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.