Well, first you're gonna want to find the group of the user SENDING your PM. This might be as easy as checking:
$vbulletin->userinfo['usergroupid'];
So in MY example, you would test for $vbulletin->userinfo['usergroupid'] == ### for the if. This makes sure that the logic is ONLY done for people of the usergroup you want. Then, make a variable (using admin_message is ok, since it is not used otherwise) and give it the value of $bbuser['field2'].
Should be straight forward, so long as those 2 variables are in scope. You may need to globalize them.
Anyone else wanna weigh in here?
|