Forums

Select only users in a specific group

algziller 12 Jan, 2015
Hi!

Gentlemen, I have a need to select only users wich are in the specific user_group.
Is that possible to do in the CF wizard, action(DB Multi Record Loader), or should I have to use "Custom Code"?

I tested the bellow select in the phpmyadmin, and it worked, but I would like to make it work in the wizard.
SELECT `u`.`id`,`u`.`name`,`g`.`user_id`,`g`.`group_id` FROM `sgq_users` AS `u`, `sgq_user_usergroup_map` AS `g` WHERE `u`.`id` = `g`.`user_id` AND `g`.`group_id` = 16

Any help?

Thks.
GreyHead 14 Jan, 2015
Hi algziller,

What are you selecting them for?

The Authenticator action will let you restrict access to a form.

The DB Multi Record loader isn't suited to table joins - but you can use your MySQL query in a Custom Code action.

Bob
algziller 18 Mar, 2015
Thanks Bob.

I solved it by applying some custom code to the results.
This topic is locked and no more replies can be posted.