Is it possible to delete members?

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-22-2007, 06:12 AM
New Pligger
 
Join Date: Jul 2007
Posts: 8
Hi,
Is it possible to delete members of my pligg site?
Thanks!
Reply With Quote
  #2 (permalink)  
Old 12-22-2007, 10:23 AM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Posts: 3,835
Yes you can


Download the full Pligg Module Pack





Reply With Quote
  #3 (permalink)  
Old 12-22-2007, 01:10 PM
skarld's Avatar
New Pligger
Pligg Version: 9.8.2
Pligg Template: GarrX
 
Join Date: Jul 2007
Location: Las Vegas
Posts: 16
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.
Reply With Quote
  #4 (permalink)  
Old 12-22-2007, 07:15 PM
New Pligger
 
Join Date: Jul 2007
Posts: 8
And how to do this?
Reply With Quote
  #5 (permalink)  
Old 12-23-2007, 10:40 AM
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 804
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!
Reply With Quote
  #6 (permalink)  
Old 01-13-2008, 03:42 PM
rossoonline's Avatar
New Pligger
 
Join Date: May 2007
Posts: 25
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.
Reply With Quote
  #7 (permalink)  
Old 03-16-2008, 05:22 PM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
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!
Reply With Quote
  #8 (permalink)  
Old 03-17-2008, 06:12 PM
rossoonline's Avatar
New Pligger
 
Join Date: May 2007
Posts: 25
Quote:
Originally Posted by tbones View Post
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!
Just killspam and disable them and do the necessary database commands as outlined above 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!
Reply With Quote
  #9 (permalink)  
Old 08-13-2008, 02:55 AM
longcountdown's Avatar
Pligg Donor
Pligg Version: 9.8.2
Pligg Template: moderno-orange
 
Join Date: Nov 2007
Location: Japan
Posts: 75
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
Reply With Quote
  #10 (permalink)  
Old 02-11-2009, 10:13 PM
Donor
Donation Level 2 
 
Join Date: Jan 2007
Posts: 22
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!!!!!
Reply With Quote
Reply

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


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development