nighteyes
03-12-2008, 10:48 AM
Hi!
I need some help from a vBulletin programming god!
I'm working on a fairly simple plugin that will send a private message to users who subscribe to one particular subscription plan in vBulletin.
The subscription has the ID of 3.
The usergroup ID users get moved after subscription is 9.
So I've decided the best way to do this is check the usergroup ID after their payment is complete.
I've chosen this hook:
paidsub_build
And the code:
<phpcode><![CDATA[if ($user['usergroupid'] == 9)
{
---CODE GOES HERE IF TRUE----
}]]></phpcode>
This isn't working for whatever reason. I guess the variable I'm trying to check is not valid, set or available from within the hook.
Should I use a different hook location? Which one?
And which variable should I check (i.e. $newusergroupid == 2)?
I'd be so grateful if someone could give me some hints on what I'm doing wrong. This is really driving me insane today.
I need some help from a vBulletin programming god!
I'm working on a fairly simple plugin that will send a private message to users who subscribe to one particular subscription plan in vBulletin.
The subscription has the ID of 3.
The usergroup ID users get moved after subscription is 9.
So I've decided the best way to do this is check the usergroup ID after their payment is complete.
I've chosen this hook:
paidsub_build
And the code:
<phpcode><![CDATA[if ($user['usergroupid'] == 9)
{
---CODE GOES HERE IF TRUE----
}]]></phpcode>
This isn't working for whatever reason. I guess the variable I'm trying to check is not valid, set or available from within the hook.
Should I use a different hook location? Which one?
And which variable should I check (i.e. $newusergroupid == 2)?
I'd be so grateful if someone could give me some hints on what I'm doing wrong. This is really driving me insane today.