Ok, I think I got this one licked...
I can tell the interest level by the high level of responses... lol. ;-)
Anyhow, I'm doing something like this.
Code:
eval('$getids = array ('.$vbulletin->userinfo['membergroupids'].');');
$dropid = "12"; //in my real code, this value is determined by an external MS SQL lookup
for($i=0;$i<count($getids);$i++) {
if($getids[$i] == $dropid) {
unset($getids[$i]);
}
}
$idupdate = implode(",", $getids);
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET membergroupids = '" . $idupdate . "' WHERE email = '" . $username . "' LIMIT 1 ");
So basically, i'm reading the contents of the membergroupids into an array, reading through the array until I find a usergroup id match, I then unset that array element, implode the array into a variable, and write it back to the database.
Seems to work really well. Not sure if there are any 'gotchas' or reasons why this would be a problem. If anyone has any feedback, I'd apprecaite it.
Maybe it will help someone else...
Bobbo