Gizmo99
01-07-2014, 07:52 AM
Hi
We have a script that will update a usergroup is they are a member of the club (DB lookup)
we use, the below as the script checks you are logged in the board (have username)
// instantiate the data manager class
$userdata =& datamanager_init('user', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($vbulletin->userinfo);
// change primary user group
$userdata->set('usergroupid', 10);
$userdata->set_info('override_usergroupid', true);
$userdata->save();
Now on the other side we have taking away access once membership has expired
If we do a straight db update on usergroup for the username ie change usergroup from 5 to 2. The User Rank (Badge)
will not change :(
if we use the above which does change the Rank instantly based on Usergroup, how do we pass the username from inside a script ??
tar muchly
Giz
We have a script that will update a usergroup is they are a member of the club (DB lookup)
we use, the below as the script checks you are logged in the board (have username)
// instantiate the data manager class
$userdata =& datamanager_init('user', $vbulletin, ERRTYPE_STANDARD);
$userdata->set_existing($vbulletin->userinfo);
// change primary user group
$userdata->set('usergroupid', 10);
$userdata->set_info('override_usergroupid', true);
$userdata->save();
Now on the other side we have taking away access once membership has expired
If we do a straight db update on usergroup for the username ie change usergroup from 5 to 2. The User Rank (Badge)
will not change :(
if we use the above which does change the Rank instantly based on Usergroup, how do we pass the username from inside a script ??
tar muchly
Giz