- Posts: 35
- Thank you received: 1
Kunena 6.3.0 released
The Kunena team has announce the arrival of Kunena 6.3.0 [K 6.3.0] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x. This version addresses most of the issues that were discovered in K 6.2 and issues discovered during the last development stages of K 6.3
Solved Kunena mass delete users
I have 35 thousand users in my forum and i would like to delete all users with 0 posts. Could you advise how to make it please?
Please Log in or Create an account to join the conversation.
Yes, it's possible to write an SQL query, run it against your database, and then target those members and delete them.
The first thing you need to do is write a query to obtain a list of members who have zero posts. Kunena stores this information in the table _kunena_users. Using phpMyAdminthe query would look something like:
It should not take you too much trouble to convert the SELECT statement above into a DELETE statement . I'll leave you to figure out the last part for yourself.
Make sure you have a good backup of your Joomla user table before you execute the DELETE, OK? After you delete the Joomla user records, run the Kunena Synch User facility.
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
sozzled wrote: Goodness me. That's a lot of members.
Yes, it's possible to write an SQL query, run it against your database, and then target those members and delete them.
The first thing you need to do is write a query to obtain a list of members who have zero posts. Kunena stores this information in the table _kunena_users. Using phpMyAdminthe query would look something like:
where "xxxxx" is the prefix of your Joomla table. This will give you the user IDs of those accounts that have not posted messages on your forum.Code:SELECT * FROM `xxxxx_users` AS Table1 INNER JOIN `xxxxx_kunena_users` AS Table2 ON Table1.id = Table2.userid WHERE Table2.posts = 0 LIMIT 0,30000
It should not take you too much trouble to convert the SELECT statement above into a DELETE statement . I'll leave you to figure out the last part for yourself.
Make sure you have a good backup of your Joomla user table before you execute the DELETE, OK? After you delete the Joomla user records, run the Kunena Synch User facility.
Thank you pal) This is really nice DB request)
Please Log in or Create an account to join the conversation.
For two days try to delete users, but i can not manage to make right sql query.
I do it like that
DELETE FROM xxxxx_users WHERE xxxxx_users.id = xxxxx_kunena_users.userid AND xxxxx_kunena_users.posts = 0
But i get an error #1054 - Unknown column 'xxxxx_kunena_users.userid' in 'where clause'
Please help to delete users
Select works nice and smooth!
Please Log in or Create an account to join the conversation.
Open the table *_kunena_users
Select Number of rows: (what is the best for you)
sort by posts
mark and delete all users with 0 posts (it is slightly more work, but it works also).[/strike]
Please Log in or Create an account to join the conversation.
What you need to do is to open the table _users and delete those records, but the question is, which records do you need to delete?
Instead, you need to create a separate SQL DELETE query to delete records from _users.
There's no go guarantee that what I am about to propose will work (becuase I haven't tried it) but you need something like "DELETE FROM xxxxx_users WHERE (SELECT * FROM `xxxxx_users` AS Table1 INNER JOIN `xxxxx_kunena_users` AS Table2 ON Table1.id = Table2.userid WHERE Table2.posts = 0);" ... and that's just a guess.
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
The users must be removed completely from Joomla.
Please Log in or Create an account to join the conversation.
DELETE `xxxxx_users`.*,`xxxxx_kunena_users`.*
FROM `xxxxx_users`,`xxxxx_kunena_users`
WHERE `xxxxx_users`.`id`=`xxxxx_kunena_users`.`userid`
AND `jku9b_kunena_users`.`posts`=0
Please Log in or Create an account to join the conversation.
- coder4life
- Offline
- Kunena Contributor
- Posts: 296
- Thank you received: 50
We could have this manually done, or maybe automatically done when someone logs into the site.
Please Log in or Create an account to join the conversation.
coder4life wrote: A follow up, I am going to change this to a feature request to prune users who have 0 posts after a period of registration. This way if the accounts are dormant accounts, most likely spam accounts, there is an easier methods to prune users and have more accurate count on the website.
We could have this manually done, or maybe automatically done when someone logs into the site.
Big thanks to all team
Please Log in or Create an account to join the conversation.