I tried all the configurations i could think of, buet everytime the mod addad more people to the group than it should.A_Jelly_Doughnut wrote:moozer: I can't really explain that ... but does it work if you set the minimum days to 0 and the maximum days to 7?
Code: Select all
if ($user_id == ANONYMOUS)
{
continue;
}
// If there is no limit, skip it.
if ((int) $data['group_min_' . $column] == 0 && (int) $data['group_max_' . $column] == 0)
{
continue;
}
// If they are outside the thresholds ...
if (($data['group_min_' . $column] != 0 && $value < $data['group_min_' . $column]) ||
($data['group_max_' . $column] != 0 && $value > $data['group_max_' . $column]))
{
$remove_groups[$group_id][] = $user_id;
}
else if ((($data['group_min_' . $column] != 0 && $value >= $data['group_min_' . $column]) ||
($data['group_max_' . $column] != 0 && $value <= $data['group_max_' . $column])) &&
(!isset($remove_groups[$group_id]) || !in_array($user_id, $remove_groups[$group_id])))
{
$add_groups[$group_id][] = $user_id;
}
Code: Select all
// because phpBB doesn't check if users are actually members of the group
// before removing them, we check it before calling group_user_del()
foreach ($remove_groups as $group_id => $user_id_ary)
{
$remove_groups[$group_id] = implode(', ', $user_id_ary);
}
$sql = 'SELECT user_id, group_id FROM ' . USER_GROUP_TABLE . '
WHERE ' . $db->sql_in_set('group_id', array_keys($remove_groups)) . '
AND ' . $db->sql_in_set('user_id', array_values($remove_groups));
$result = $db->sql_query($sql);
Code: Select all
// because phpBB doesn't check if users are actually members of the group
// before removing them, we check it before calling group_user_del()
$user_ids = array();
foreach ($remove_groups as $group_id => $user_id_ary)
{
$user_ids = array_merge($user_ids, $user_id_ary);
}
$sql = 'SELECT user_id, group_id FROM ' . USER_GROUP_TABLE . '
WHERE ' . $db->sql_in_set('group_id', array_keys($remove_groups)) . '
AND ' . $db->sql_in_set('user_id', $user_ids);
$result = $db->sql_query($sql);
So basically I am making a "Senior Members" area where users who have been registered on the forum for 2 years, have at least 100 posts, and less than 3 warnings, will be granted access to this area. However, every time I set this criteria, after I check the group a few minutes later, there are users in this group who haven't even been members for 1 year yet. Is there a fix for this?Minimum days of membership: 730 (2 years)
Maximum days of membership: 0
Minimum post count: 100
Maximum post count: 0
Minimum warnings points: 0
Maximum warning points: 3
Sorry, that was a typo - yes it is set to 100. I have edited the post.david63 wrote:Should you not be setting Minimum post count = 100 and Maximum post count = 0?????