![]() |
is_member_of problem
hi
i don't understand why this https://vborg.vbsupport.ru/showthrea...17#post1425217 is a problem the function is built this way: PHP Code:
PHP Code:
PHP Code:
does somebody know what i'm making false? |
Whats the value of $vbulletin->options['login_groups']?
(You'll need to explode() it if it is a character delimited list of group Ids.) |
The value is 2,3,4
It is a default fielt(textfield). So i thouth it is saved as 2,3 into the db and then i can just insert the value into the function |
have to be
PHP Code:
|
ok thx
|
As nexialys has shown you need to explode it as 2,3,4 appears to PHP as string, like "2,3,4," so when you insert it into your function it would look like this: is_member_of($vbulletin->userinfo, "2,3,4") which as you have found won't work. ;)
|
but then it returns an array.
and in the functioninformation there is no array required, so i thought it must be a list of numbers.. thx |
having read the next lines after the function is_member_of() { would have give you a hint, it verify if the $usergroupid is an array or not... ;)
|
have you nothing to do with your baby, instead of saying/writing that i'm not reading the whole function?:P
*joke*;) but yes, thats right i thought the whole time that this is also so a function which accepts a string like the documentation sais: Code:
* This function can be overloaded to test multiple usergroups: is_member_of($user, 1, 3, 4, 6...) |
hum the function documentation have a typo then... you can report it to the official site ;)
and yeah, i have a newborn, but i also have a wife and 3 other kids to take care of a 7 pounds baby.. lol... i take care of her when everybody is exhausted... |
All times are GMT. The time now is 09:58 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|