Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Banned bbrian017's Avatar
    Joined
    Oct 2007
    Posts
    784

    Delete users from database and admin user management

    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, 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

  2. #2
    Pligg Donor betagirl's Avatar
    Joined
    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?

  3. #3
    Banned bbrian017's Avatar
    Joined
    Oct 2007
    Posts
    784
    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?

  4. #4
    New Pligger depapepe's Avatar
    Joined
    Jan 2009
    Posts
    4
    yea.. i have to delete from phpmyadmin cpanel admin manually.. so impractical

  5. #5
    New Pligger hokewilcox's Avatar
    Joined
    Mar 2009
    Posts
    6
    Impractical yes, but doable....I wonder if they will fix that?

  6. #6
    New Pligger cchh's Avatar
    Joined
    Jun 2009
    Posts
    5

    Lightbulb

    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#}

  7. #7
    New Pligger cchh's Avatar
    Joined
    Jun 2009
    Posts
    5
    has anyone review my patch?

  8. #8
    Pligg Developer chuckroast's Avatar
    Joined
    Jun 2006
    Posts
    5,478
    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.

  9. #9
    New Pligger fontadoni's Avatar
    Joined
    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.

  10. #10
    New Pligger esavvy's Avatar
    Joined
    Jan 2010
    Posts
    7
    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

Page 1 of 2 12 LastLast

Similar Threads

  1. how one god(admin) delete other god(admin) User
    By johnsmeth0 in forum Questions & Comments
    Replies: 4
    Last Post: 01-05-2012, 01:48 AM
  2. How to delete all users from database
    By Fuggled in forum Questions & Comments
    Replies: 1
    Last Post: 10-06-2009, 08:23 AM
  3. delete discarded entries from admin panel and database
    By jaf7 in forum Questions & Comments
    Replies: 7
    Last Post: 02-24-2009, 10:45 PM
  4. Cant see anything except User Management on the Admin Page
    By The Edifier in forum Questions & Comments
    Replies: 1
    Last Post: 12-24-2006, 09:13 PM
  5. Replies: 0
    Last Post: 08-09-2006, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting