XF 2.0 Questions related to XenForo Finder

Finexes

Well-known member
Hey guys,

I'd need a little help with the XenForo Finder as I am completely new to this.

1) I am using the XenForo Finder to show members of specific usergroups in my template. Currently, the specific part of my PHP code looks like this:

PHP:
$usersMember = \XF::finder('XF:User')->where('secondary_group_ids', 48)->order('username', 'ASC')->fetch();

That works as expected, except there's one problem: Our users have several secondary user groups. When a user has the secondary groups
Code:
48, 50, 51
, it works. But when the user is member of groups
Code:
37, 48, 50
, it doesn't, although he is part of group 48. Does anyone have a solution for this?

2) Later I would also like to show members that ticked a specific profile field. Would it be possible using the Finder?

Thank you very much for your input, it's appreciated :)
 
Fantastic, that works great! Thank you very much CMTV :)

Now I just a need a solution for selecting users with a specific profile field ticked.
 
Back
Top Bottom