Sorry about that, forgot to include the plugin code:
Code:
global $vbulletin;
$dataman =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$dataman->set_existing($vbulletin->userinfo);
if (stuff here)
{
$dataman->set('usergroupid', 8);
$dataman->save();
}
For the sake of trying, I've replaced the main code of (stuff here) with:
Code:
IF ($vbulletin->userinfo['usergroupid'] == 9)
The bold is what I recently added, but getting this as a result:
Code:
Fatal error: Existing data passed is not an array
Called set_existing in /vbulletin/includes/class_core.php(4016) : eval()'d code on line 5
Called eval in /vbulletin/includes/class_core.php on line 4016
Called fetch_session in /vbulletin/includes/class_core.php on line 3757
Called vB_Session in /vbulletin/includes/init.php on line 647
Called require_once in /vbulletin/includes/class_bootstrap.php on line 101
Called init in /vbulletin/includes/class_bootstrap.php on line 72
Called bootstrap in /vbulletin/global.php on line 26
Called require_once in /vbulletin/forum.php on line 67
Called require in /vbulletin/index.php on line 43
in /vbulletin/includes/class_dm.php on line 265
Also tried $this->registry to replace vbulletin->userinfo, same message. Does this mean I need to include those php files? Or global already includes it, but the first "fatal error" is something I need to pay attention to.