Hi,
Is it possible to delete members of my pligg site?
Thanks!


![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Hi, Is it possible to delete members of my pligg site? Thanks! |
| ||||
| Yes you can |
| ||||
| You can disable a user from the admin panel, but you will have to delete a user form the the pligg_users table in your pligg database. |
| |||
| Well you want to kill spam your member first! This way when you delete the users from the database it won't affect your pligg site! Things that get affected are posts, comments, submission, etc... Then go into your phpadmin and browse the users table. From there you can delete that specific user. This is also a great way to delete comments and spam submission as well! |
| ||||
| Killspamming and disabling them is fine but the votes made by the disabled user still seem to exist. Not sure if this is an issue but disabled users still appear on the who voted sections on stories. Anyway, to delete users and their votes once you've disabled and killspammed them use this query in PHPMyAdmin: SELECT * FROM `bs_votes` WHERE `vote_user_id` IN (SELECT `user_id` FROM `bs_users` WHERE `user_email` = 'blank@blank.com'); This will select all the votes from users who have an email address set as blank@blank.com. Now all you have to do is select "Check All" and click the delete icon and everything that was left of the votes after the killspam should be gone. Now to delete all the users, now that their votes have gone, just use: SELECT * FROM `bs_users` WHERE `user_email` = 'blank@blank.com' and click "Check All" and delete! Only issue with this though is that the stories themselves have a number associated with them saying how many votes they have! The spammy user data is gone and so is the related vote data for them in the vote table, reducing the amount of redundant data. The tip above will help reduce the size of your database but each story will still say the amount of votes its been given. Leaving the amount of votes each story has will not unecessarily increase the database size, so this isnt an issue technically wise. Unless you REALLY dont' want have the votes from deleted users there. Now from looking into it for a bit I couldnt see any easy way of correcting the figures for the story votes as they seem to be incremented and not relational to the vote tables, so I couldnt create a MYSQL query regarding this. Last edited by rossoonline; 01-13-2008 at 05:02 PM. |
| |||
| Did I get it right? Classic killspam (I use the harder version: http://forums.pligg.com/general-help...pambruise.html) leaves the users behind with the email address blank@blank.com? Or was it disable users or has the address to be changed manually? Your solution sounds promising! |
| ||||
| Quote:
only other thing i noticed is that if the deleted users have any messages in their inbox then they will stay there as well but if you know how to use phpmyadmin then that won't be a problem for you! |
| ||||
| I have hundreds of users (probably all spam registrations) with zero comments, votes and submissions. It would take too long to killspam them all first, so can anyone tell me the correct SQL needed to "delete all users where votes == 0 and stories == 0 and comments == 0". Obviously this isn't something I fancy experimenting with myself! EDIT: Having looked at the database, I realize my request is incredibly difficult. I had to go a different route and use a variation of karma I made months ago which gives points to users based on their all-time activity. I was able to delete all users with zero points. Since this isn't part of the standard Pligg, I can only suggest following rossoonline's tips above. Last edited by longcountdown; 08-13-2008 at 03:38 AM. Reason: Found alternative solution |
| |||
| use this at your own risk (and maybe people can say if there is anything that I missed) but I think the sql to delete users that haven't voted or commented or linked is: SELECT * FROM `pligg_users` WHERE NOT EXISTS ( SELECT * FROM `pligg_links` WHERE `link_author` = `pligg_users`.`user_id` ) AND NOT EXISTS ( SELECT * FROM `pligg_votes` WHERE `vote_user_id` = `pligg_users`.`user_id` ) AND NOT EXISTS ( SELECT * FROM `pligg_comments` WHERE `comment_user_id` = `pligg_users`.`user_id` ) It seems to have worked for me. I had like 3000 users in this category and after upgrading to 1.0 RC1 and turning on Email Validation, my spam dropped until the spammers started using these old accounts. I have deleted them all now and will be interested as too see how much spam I get now. HTH and make sure you backup before using and as I say, use at your own risk!!!!! |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My Tube lets members add video to profiles | chuckroast | Modules for Sale | 0 | 04-23-2009 07:11 PM |
| How to a) discarded stories and b) delete users? | Cruth | Questions and Comments | 1 | 06-01-2008 07:50 PM |
| how to delete links from database? | ivytony | Questions and Comments | 1 | 02-16-2008 12:15 AM |
| Displaying number of members | Geoserv | Questions and Comments | 3 | 01-22-2008 11:08 AM |
| i want to delete "all value" but failed after delete & save then check again | bhatiacane | Questions and Comments | 1 | 12-29-2007 06:13 AM |