• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

how to filter a dropdown list of jos_users by user group

Status
Not open for further replies.

skyrun

Active Member
i would like to have a dropdown element that lists all users in a certain user group.

is there an easy way to do that? back in j!1, you could do a WHERE usertype = 'editor'. i would like to do something similar.

my idea so far is to create a few that has the userid and name and a concatenated list of user groups and do a WHERE usergroups like '%whatever%' on the view.

is there a better way anyone has found
 
User and groups are now many to many.
You can do
WHERE id IN ( SELECT user_id FROM #_user_usergroup_map WHERE group_id = your-certain-group-id)
 
thanks troester, that's the perfect answer! i created a view, your way is much better.

in case it's not obvious to others:
WHERE id IN ( SELECT user_id FROM jos_user_usergroup_map WHERE group_id IN (group_id1, group_id2, etc))
works for multiple groups (note the 2nd end parenthesis, one for the in and one for the subselect) and that selecting a higher level group doesn't automatically select the lower level groups like it does for joomla items (ie selecting 'registered' doesn't get 'editor's
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top