lightwave
07-10-2006, 06:55 PM
I'm trying to add a modification for my forum to place all registered members in one of 4 secondary group.
The ID's of the secondary usergroups are 11, 12 ,13, 14.
Does anybody know what file the query is located in for inserting the values in the database when a new user registers. i looked at register.php and it's not there.
As for existing members, would this work?
$Secondary_Group = RANDOM(11,14);
$member= $db->query_first("SELECT membergroupids FROM " . TABLE_PREFIX . "user WHERE username='" . $db->escape_string($vbulletin->GPC['username']) . "'"))
if ($member['groupids'])
{
}
else
{
$db->query_write("UPDATE " . TABLE_PREFIX . "users SET membergroupids=$Secondary_Group WHERE userid=" . $vbulletin->userinfo['userid']" ");
}
The ID's of the secondary usergroups are 11, 12 ,13, 14.
Does anybody know what file the query is located in for inserting the values in the database when a new user registers. i looked at register.php and it's not there.
As for existing members, would this work?
$Secondary_Group = RANDOM(11,14);
$member= $db->query_first("SELECT membergroupids FROM " . TABLE_PREFIX . "user WHERE username='" . $db->escape_string($vbulletin->GPC['username']) . "'"))
if ($member['groupids'])
{
}
else
{
$db->query_write("UPDATE " . TABLE_PREFIX . "users SET membergroupids=$Secondary_Group WHERE userid=" . $vbulletin->userinfo['userid']" ");
}