Log in

View Full Version : is_member_of Help


Benumbed
05-29-2008, 03:03 AM
This works...

<if condition="is_member_of($vbulletin->userinfo, 5,6,10)">

This doesn't...

<if condition="is_member_of($vbulletin->userinfo, $vboptions[ircchat_permissions])">

The last one works if it contains only 1 number, and not more than 1 seperated by comma's. Why does it not work when I add more than 1, when it works if i directly input it instead of a variable?

Dismounted
05-29-2008, 07:37 AM
In the first sample, you are overloading the function (look it up). In the second sample, you are merely making the second value a string.

See this example (note the quotes):
// this is effectively what you are doing
is_member_of($vbulletin->userinfo, '5, 6, 10');
You need to explode the string and just provide the array to the function. The function can handle an array, or overloading.

Benumbed
05-29-2008, 11:45 AM
Thanks, that worked. Knew it had to be something simple that I was overlooking.