MyBB Community Forums

Full Version: Deleting Banned Spam Accounts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Open ./inc/tasks/userpruning.php file and find;
	// Are we pruning unactivated users?
	if($mybb->settings['pruneunactived'] == 1)
	{
		$regdate = TIME_NOW-(intval($mybb->settings['dayspruneunactivated'])*24*60*60);
		$query = $db->simple_select("users", "uid", "regdate <= ".intval($regdate)." AND usergroup='5'");
		while($user = $db->fetch_array($query))
		{
			$users[$user['uid']] = $user['uid'];
		}
	}
and add the following code just AFTER that;
	// Change it to 0 if you don't want it to run.
	$delete_banned_users = '1';
	if ($delete_banned_users != "0")
	{
		$query = $db->simple_select("users", "uid", "usergroup = '7'");
		while ($user = $db->fetch_array($query))
		{
			$users[$user['uid']] = $user['uid'];
		}
	}

Now go to: Admin CP > Configurations > User Pruning > Enable user pruning? > and select ON

Now login to AdminCP > Tools and Maintenance > Task Manager > and Click on the small clock [Image: run_task.gif] in front of the "User Pruning" option.

It will delete the banned user's accounts Smile
Yaldaram, Thank you but I followed your instructions and nothing happened..

EDIT: My reading comprehension skills need work. I think it's doing its thing now... Standby...

Fixed! Thank you!
Don't forget to change the following; Wink
    // Change it to 0 if you don't want it to run.
    $delete_banned_users = '1';
Good work Yaldaram Smile
Pages: 1 2