bug in pre-filter Condition

samani

Member
hi
when i use "NOT IN" or use "IN" give the same result, can you check that?for example i want to get list of users not in superuser group . i use this:
return JAccess::getUsersByGroup(8);
 
Last edited:
you day right but look at my example:
i have user A B C D E F
A , B is super admin
when i use prefilter:
1)
IN Eval( return JAccess::getUsersByGroup(8); )
==> A,B
2)
NOT IN Eval( return JAccess::getUsersByGroup(8); )
==> A,B
3)
when i don't use any prefilter
==> A,B,C,D,E,F
 
I don't think you should preface the 'Value' value with the word 'return'.
A 'return' is already assumed when you select 'Eval' as Type.

So there is no "bug". It's not that "NOT IN" or "IN" gives the same result.
Either way, as troester explained, the reason it fails is because your 'Value' is returning an array ( getUsersByGroup() ) when, in fact, the mySQL IN() function expects a string.

Try using
implode(",",JAccess::getUsersByGroup(8))
as the 'Value' value to which a php 'Eval' should be applied.
(Which should then return a comma delimited string of all the userIds in the '8' user group - which is what you would want to be used with the 'IN' Condition.)
 
Last edited:
You do need the return.

I can't recall if we aytomatically add the parens, I think we do. So ...

Code:
return implode(",",JAccess::getUsersByGroup(8));

-- hugh
 
If I only took the time to test I would have figured that out for myself and saved the embarrassment. Oh well - I did say "I don't think".:oops:
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top