Vergleich inc/tasks/userpruning.php - 1.8.4 - 1.8.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 23Zeile 23
		$in_usergroups = array();
$users = array();


		$in_usergroups = array();
$users = array();


		$usergroups = $cache->read("usergroups");

		$usergroups = $cache->read('usergroups');

		foreach($usergroups as $gid => $usergroup)
{
// Exclude admin, moderators, super moderators, banned

		foreach($usergroups as $gid => $usergroup)
{
// Exclude admin, moderators, super moderators, banned

Zeile 40Zeile 40
			$key = array_search('5', $in_usergroups);
unset($in_usergroups[$key]);
}

			$key = array_search('5', $in_usergroups);
unset($in_usergroups[$key]);
}

 

$prunepostcount = (int)$mybb->settings['prunepostcount'];


$regdate = TIME_NOW-((int)$mybb->settings['dayspruneregistered']*24*60*60);


$regdate = TIME_NOW-((int)$mybb->settings['dayspruneregistered']*24*60*60);

		$query = $db->simple_select("users", "uid", "regdate <= ".(int)$regdate." AND postnum <= ".(int)$mybb->settings['prunepostcount']." AND usergroup IN(".$db->escape_string(implode(',', $in_usergroups)).")");
while($user = $db->fetch_array($query))










$usergroups = $db->escape_string(implode(',', $in_usergroups));

$query = $db->simple_select('users', 'uid', "regdate<={$regdate} AND postnum<={$prunepostcount} AND usergroup IN({$usergroups})");
while($uid = $db->fetch_field($query, 'uid'))
{
$users[$uid] = $uid;
}

if($users && $mybb->settings['prunepostcountall'])

		{

		{

			$users[$user['uid']] = $user['uid'];








			$query = $db->simple_select('posts', 'uid, COUNT(pid) as posts', "uid IN ('".implode("','", $users)."') AND visible>0", array('group_by' => 'uid'));
while($user = $db->fetch_array($query))
{
if($user['posts'] >= $prunepostcount)
{
unset($users[$user['uid']]);
}
}

		}
}


		}
}


Zeile 53Zeile 70
	if($mybb->settings['pruneunactived'] == 1)
{
$regdate = TIME_NOW-((int)$mybb->settings['dayspruneunactivated']*24*60*60);

	if($mybb->settings['pruneunactived'] == 1)
{
$regdate = TIME_NOW-((int)$mybb->settings['dayspruneunactivated']*24*60*60);

		$query = $db->simple_select("users", "uid", "regdate <= ".(int)$regdate." AND usergroup='5'");

		$query = $db->simple_select("users", "uid", "regdate<={$regdate} AND usergroup='5'");

		while($user = $db->fetch_array($query))
{
$users[$user['uid']] = $user['uid'];

		while($user = $db->fetch_array($query))
{
$users[$user['uid']] = $user['uid'];