Here's the code I inserted:
## Update Usergroup ##
// Usergroup-ID Group 1 (old group)
$gid1 = "2";
// Usergroup-ID Group 2 (new group)
$gid2 = "17";
// Minimal number of posts
$minposts = "5";
// Update user
if ($mybb->user['postnum'] == $minposts)
{
// Update usergroup
$update_group = $db->query("UPDATE ".TABLE_PREFIX."users SET usergroup = '".$gid17."', displaygroup = '".$gid17."' WHERE uid = '".$mybb->user['uid']."' AND usergroup = '".$gid2."'");
}
## Update Usergroup ##
Where 17 is the id of the new usergroup. It's not automatically updating the usergroup (not running the query). Did I forget anything or whatsoever?
BTW, The first method is CORRUPTING my new usegroup. WTH???
## Update Usergroup ##
// Usergroup-ID Group 1 (old group)
$gid1 = "2";
// Usergroup-ID Group 2 (new group)
$gid2 = "17";
// Minimal number of posts
$minposts = "5";
// Update user
if ($mybb->user['postnum'] == $minposts)
{
// Update usergroup
$update_group = $db->query("UPDATE ".TABLE_PREFIX."users SET usergroup = '".$gid17."', displaygroup = '".$gid17."' WHERE uid = '".$mybb->user['uid']."' AND usergroup = '".$gid2."'");
}
## Update Usergroup ##
Where 17 is the id of the new usergroup. It's not automatically updating the usergroup (not running the query). Did I forget anything or whatsoever?
BTW, The first method is CORRUPTING my new usegroup. WTH???