View Single Post
Old 06 Dec 2012, 19:31
kh99 kh99 is offline
Join Date: Aug 2009
Real name: Kevin
As long-winded as that above post is, I didn't mention the fact that there are some things which might need to be updated when the groups change, so if you want to do it in code the best way is to use the datamanager. And when removing a group, the way the vb code does it is to get an array of current ids in membergroupids, remove the one being deleted, and set that field to the new array.

So, if you're doing this as part of a vbulletin script (as a plugin or a "vbulletin powered" page), you'd want to do something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you're not using a vbulletin script, then you could still read the membergroupids field, build a new list, and update it, but be aware that some things might not get updated correctly (I'm not sure offhand what they are - you'd need to study includes/class_dm_user.php and see what happens when usergroups are changed).
Reply With Quote