Here's a handy PHP snippet to purge user accounts for all users who haven't created any nodes on your site. It's useful when you have a lot of users who have signed but haven't created any nodes.
<?php
// Get a list of all users in the site who have not created any nodes, AND uid > 1
$sql = "SELECT u.uid FROM {users} u WHERE u.uid NOT IN (SELECT DISTINCT n.uid FROM {node} n) AND u.uid > 1 ORDER BY uid";
$result = db_query($sql);
while($row = db_fetch_object($result)) {
// delete the user account
user_delete(array(), $row->uid);
}
?>
Recent comments
4 days 7 hours ago
5 days 4 hours ago
6 days 6 hours ago
1 week 2 days ago
1 week 4 days ago
1 week 4 days ago
2 weeks 13 hours ago
7 weeks 4 days ago
7 weeks 4 days ago
8 weeks 23 hours ago