Hi David,
Just deleting the user information from the users table will likely cause problems, or at the very least leave cruft lying around in the DB, as user information is stored in other tables than the users table. This is what I do when faced with the same situation (and there are probably many ways to do this):
1) get all the spam users' user IDs (usually by querying the database to select all user IDs against a common spam identification trait -- for example, if the phone or fax field in the users table is "123456");
2) save these IDs to a text file, eg. called userIds.txt;
3) run the following PHP script
- Code: Select all
<?php
$ids = file('userIds.txt', FILE_SKIP_EMPTY_LINES);
foreach ($ids as $member_id => $id) {
echo exec ("php ojs/tools/mergeUsers.php admin " .escapeshellcmd($id));
}
?>
... where "admin" is the name of the user you want all the spam users merged to.
NB: don't place/store the script anywhere where it's web-accessible. And always make a backup of your database before running something like this.
Cheers,
James