How can I select the users (or their email addresses) from a certain user group and export them to a CSV file?
Let me explain: I have different users and different user groups created in Joomla. I want to export the user email addresses from one certain user group to a CSV file.
With ChronoForms I am able to export all of the users with the CSV Export function. But how can I do this for the email addresses of one certain user group?
Let me explain: I have different users and different user groups created in Joomla. I want to export the user email addresses from one certain user group to a CSV file.
With ChronoForms I am able to export all of the users with the CSV Export function. But how can I do this for the email addresses of one certain user group?
Hello geertmartens,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I ask new users for information and not ask logged in users?
How can I add a User to a User Group?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I ask new users for information and not ask logged in users?
How can I add a User to a User Group?
P.S: I'm just an automated service😉
I thought a 'custom code' action with the following -followed by the 'CSV Export' action- would do the trick, but not so:
SELECT id, email
FROM web_users
WHERE id IN
( SELECT user_id
FROM web_user_usergroup_map
WHERE value = 14
);
SELECT id, email
FROM web_users
WHERE id IN
( SELECT user_id
FROM web_user_usergroup_map
WHERE value = 14
);
I executed this code via phpMyAdmin and this works.
SELECT id, email FROM web_users WHERE id IN ( SELECT user_id FROM web_user_usergroup_map WHERE group_id = 14 )
So how do I integrate this into ChronoForms?
SELECT id, email FROM web_users WHERE id IN ( SELECT user_id FROM web_user_usergroup_map WHERE group_id = 14 )
So how do I integrate this into ChronoForms?
Hi geertmartens,
I'd probably add the query to a Custom Code action
Bob
I'd probably add the query to a Custom Code action
<?php
$db = JFactory::getDBO();
$query = "
SELECT `id`, `email`
FROM `web_users`
WHERE `id` IN ( SELECT `user_id` FROM `web_user_usergroup_map` WHERE `group_id` = 14 )
";
$db->setQuery($query);
$form->data['user_list'] = $db->loadAssocList();
?>
Bob
This topic is locked and no more replies can be posted.
