Thanks a lot,
So I get most of my answers with this hook "userdata_presave" to validate my field via API & "userdata_postsave" to change the usergroup....
--------------- Added [DATE]1354952836[/DATE] at [TIME]1354952836[/TIME] ---------------
I more query, How do I set a secondary user group.
I can fetch all data of a user using
global $vbulletin;
get the existing membergroup ids as $vbulletin->userinfo['membergroupids']; now I want update the exisiting member ids.
I found this line in forums:
$userdata->set('membergroupids',$membergroupids);
is $userdata also a global var like $vbulletin? when I try updating the update field is stuck ... is there something Im doing wrong here..
--------------- Added [DATE]1354955672[/DATE] at [TIME]1354955672[/TIME] ---------------
That worked....
But now I am stuck at another issue, I used my code for the administrator and it worked, ,
$userdata->set('membergroupids',$membergroupids);
So, now the admin is has addition usergroup, but this did not work for the other sample user I tried...
even a simple error message on profile field update is not appearing for the user...
any clues?
|