Deleting Spam Accounts using SQL

So, most of my spam users are using the country AX.

Would the following be safe to  run

DELETE FROM `Profiles` WHERE `Country`='AX'

Are there any other tables that could be populated that I need to include?

This would help me delete 95% of my spam since nothing else really seems to be working using the Dolphin methods...

Thanks!

Peer

Peer L. Plaut Executive Director, Single Booklovers Connecting Bookworms Since 1970
Quote · 8 Jan 2012

I would stop them from joining in the first place.

http://www.boonex.com/forums/topic/spam-spam-spam-spam-IDEA-.htm

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 8 Jan 2012

Peer,

 

If you do this it will leave behind the blogs, ads, tags and all the other garbage they posted. The only way to get rid of all of it is to delete them from Admin. 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 8 Jan 2012

 i have to concur with mscott, you are best to remove them from the admin panel, that way, supposedly, all their trash goes away with them, though depending on the version of your dolphin actually. 

Peer,

 

If you do this it will leave behind the blogs, ads, tags and all the other garbage they posted. The only way to get rid of all of it is to delete them from Admin. 

 

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 9 Jan 2012

You can use a php script to do it.

Create a new php script named remove_profiles.php

Put the following code in it. Modify query as needed.

<?php
require_once('../inc/header.inc.php');
require_once(BX_DIRECTORY_PATH_INC . 'db.inc.php');
require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php');
require_once(BX_DIRECTORY_PATH_INC . 'utils.inc.php');

if (isAdmin()) {
    $res = db_res("SELECT `ID` FROM `Profiles` WHERE `Country`='AX'");
    if ($res)
        {
            $db_clean_profiles_num = mysql_num_rows($res);
            while ( $arr = mysql_fetch_array($res) )
            {
                profile_delete($arr['ID']);
            }
            db_res("OPTIMIZE TABLE `Profiles`");
            echo 'Removed ' . $db_clean_profiles_num . ' accounts.';
        }
    } else {
        echo 'You must be logged in as an administrator to run this script.';
    }
?>

Upload the new script to your administration folder.

Run it like so.

http://www.yoursite.com/administration/remove_profiles.php

NOTE: Although this script checks to make sure an admin is running it, it should not be left on the server. It has not been checked for security vulnerabilities.

https://www.deanbassett.com
Quote · 9 Jan 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.