Delete users from database and admin user management

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-29-2007, 04:37 PM
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 804
I'm having issues deleting the test users I created. I can stop the account from being active delete the users and all comments/posts but when I look at the top users page,Blog Engage they are all still there as if I never deleted them.

How do I permanently get rid of the users ?

Delete users from database and admin user management

See the users test users still show up

Blog Engage

Last edited by bbrian017; 10-29-2007 at 04:40 PM.
Reply With Quote
  #2 (permalink)  
Old 12-04-2007, 12:42 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
I'd love to be able to do this as well. We sometimes get requests from users to delete their accounts, and while killspamming removes their stories and comments, their accounts can still be search for and navigated to if the direct URL and username is known. Why is there no "delete user account" option?
Reply With Quote
  #3 (permalink)  
Old 12-04-2007, 11:54 AM
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 804
I would also like to see a Delete story. You can always access deleted stories and if it's porn related this is unacceptable. Is there an option to delete a story not just discard it?
Reply With Quote
  #4 (permalink)  
Old 01-25-2009, 06:19 AM
New Pligger
Pligg Version: 9.9
 
Join Date: Jan 2009
Posts: 4
yea.. i have to delete from phpmyadmin cpanel admin manually.. so impractical
Reply With Quote
  #5 (permalink)  
Old 04-28-2009, 06:01 AM
New Pligger
 
Join Date: Mar 2009
Posts: 6
Impractical yes, but doable....I wonder if they will fix that?
Reply With Quote
  #6 (permalink)  
Old 07-23-2009, 08:46 PM
New Pligger
 
Join Date: Jun 2009
Posts: 5
I made patch for delete emtpy users.
Users with now votes and stories (links).

Open admin->manage->users. here you can sea: Count empty users All users: 1478
click to `Count empty users` and you can sea Delete N empty users, click it and all spammers will be die!

Here is my patch:
Code:
Index: admin/admin_users.php
===================================================================
--- admin/admin_users.php       (revision 685)
+++ admin/admin_users.php       (working copy)
@@ -702,7 +702,46 @@
                }

                $main_smarty->assign('userlist', $userlist);
+
+               if (sanitize($_GET["countEmptyUsers"], 3) == "count"){ //count Empty Users
+
+                       $emptyUsers = mysql_query("SELECT count(distinct u.user_id) ".
+                       "FROM " . table_users . " u ".
+                       "LEFT JOIN " . table_links . " l ON u.user_id = l.link_author ".
+                       "LEFT JOIN " . table_votes . " v ON u.user_id = v.vote_user_id ".
+                       "WHERE l.link_id IS NULL ".
+                       "AND v.vote_user_id IS NULL");
+
+                       $arr = mysql_fetch_array( $emptyUsers);
+
+
+                       $main_smarty->assign('countEmptyUsers', $arr[0] );
+               }
+
+               if (sanitize($_GET["countEmptyUsers"], 3) == "delete"){ //delete Empty Users
+
+                           $emptyUsers = mysql_query("SELECT distinct u.user_id ".
+                           "FROM " . table_users . " u ".
+                           "LEFT JOIN " . table_links . " l ON u.user_id = l.link_author ".
+                           "LEFT JOIN " . table_votes . " v ON u.user_id = v.vote_user_id ".
+                           "WHERE l.link_id IS NULL ".
+                           "AND v.vote_user_id IS NULL");
+                           while ($arr = mysql_fetch_array( $emptyUsers)) {
+                                   $db->query('DELETE FROM `' . table_comments . '` WHERE `comment_user_id` = "'. $arr[0] . '"');
+                                          $db->query('DELETE FROM `' . table_votes . '` WHERE `vote_user_id` = "'.$arr[0].'"');
+                                          $db->query('DELETE FROM `' . table_saved_links . '` WHERE `saved_user_id` = "'.$arr[0].'"');
+                                          $db->query('DELETE FROM `' . table_trackbacks . '` WHERE `trackback_user_id` = "'.$arr[0].'"');
+                                          $db->query('DELETE FROM `' . table_friends . '` WHERE `friend_id` = "'.$arr[0].'"');
+                                          $db->query('DELETE FROM `' . table_messages . '` WHERE `sender` = "'.$arr[0].'"');
+                                          $db->query('DELETE FROM `' . table_messages . '` WHERE `receiver` = "'.$arr[0].'"');
+                                   $db->query('DELETE FROM `' . table_users . '` WHERE `user_id` = "'. $arr[0] . '"');
+                           }
+                          }
+
+                      $main_smarty->assign('countUsers', $rows );

+
+
                // breadcrumbs anf page title
                $navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Header_AdminPanel');
                $navwhere['link1'] = getmyurl('admin', '');
Index: templates/admin/user_listall_center.tpl
===================================================================
--- templates/admin/user_listall_center.tpl     (revision 685)
+++ templates/admin/user_listall_center.tpl     (working copy)
@@ -14,7 +14,17 @@

   <a href="{$my_pligg_base}/admin/admin_users.php?mode=create" title="Create User" id="create">{#PLIGG_Visual_AdminPanel_New_User#}</a>
   <div class="multiBoxDesc create">{#PLIGG_Visual_AdminPanel_New_User_Desc#}</div>
-
+
+&nbsp;&nbsp;&nbsp;
+  {if !isset($countEmptyUsers)}
+       <a href='{$my_pligg_base}/admin/admin_users.php?countEmptyUsers=count'>Count empty users</a>
+  {else}
+       <a href='{$my_pligg_base}/admin/admin_users.php?countEmptyUsers=delete'>Delete {$countEmptyUsers} empty users</a>
+  {/if}
+  &nbsp;&nbsp;&nbsp;
+
+  All users: {$countUsers}
+
 </form>
 <form action="{$my_pligg_base}/admin/admin_users.php" method="get">
        {#PLIGG_Visual_AdminPanel_Pagination_Items#}
Reply With Quote
  #7 (permalink)  
Old 07-28-2009, 05:12 PM
New Pligger
 
Join Date: Jun 2009
Posts: 5
has anyone review my patch?
Reply With Quote
  #8 (permalink)  
Old 07-28-2009, 08:34 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Galleria
 
Join Date: Jun 2006
Location: PA
Posts: 3,828
Quote:
Originally Posted by cchh View Post
has anyone review my patch?
I have and I think it's great. Thanks for sharing.
I would recommend starting a new thread under the "modification tutorials" forum.
Something good like this kind of gets lost, deep inside a thread like this.


Get the full Pligg Module Pack today.

Anyone want the domain MyHubb.com ? Bid Now!




Reply With Quote
  #9 (permalink)  
Old 09-27-2009, 07:54 PM
New Pligger
Pligg Version: 1.0.1
Pligg Template: Modified Yget
 
Join Date: Oct 2007
Posts: 2
Quote:
Originally Posted by cchh View Post
has anyone review my patch?
Thanks a lot man! It works great. I just got rid of 300 hundred spammers. This function should be included in the original script.
Reply With Quote
  #10 (permalink)  
Old 01-17-2010, 08:38 PM
New Pligger
 
Join Date: Jan 2010
Posts: 6
Quote:
Originally Posted by betagirl View Post
I'd love to be able to do this as well. We sometimes get requests from users to delete their accounts, and while killspamming removes their stories and comments, their accounts can still be search for and navigated to if the direct URL and username is known. Why is there no "delete user account" option?

I appologize if this question has already been answered. I am posting it here because I couldn't find any suitable answer anywhere in this forum.

I would like to know if betagirls concern about deleting user accounts when they request it, has been addressed because I will like to be able to do that without affecting my entire site.

I think this is important because of the ever changing laws regarding online privacy and the right of individuals to decide how much of their personal information is stored online by websites.

Any helpful tips are welcome.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
after installation,my admin account can not login in and new user can not Register lojojo Questions and Comments 8 09-29-2009 09:15 AM
Admin Panel for 1.0 and above mismeflight Wiki Articles 0 03-04-2009 10:04 AM
delete discarded entries from admin panel and database jaf7 Questions and Comments 7 02-25-2009 01:45 AM
How to upgrade from 9.9.5 to 1.0 RC1? I Show You How In Here! argh2xxx Questions and Comments 6 02-02-2009 04:04 AM
Pligg beta 9.5 [updated] kbeeveer46 Current Version 0 04-29-2007 09:58 PM


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