Contribution Date
Technology
Contribution Project
Contribution Details
This can be achieved with the following lines of code added to the sms_blast.module.
/**
* Implements hook_rules_action_info().
*/
function sms_blast_rules_action_info()
{
return array(
'sms_blast_rules_action_fetch_users' => array(
'label' => t('Fetch Users to send sms'),
'group' => t('SMS'),
'arguments' => array(
),
'provides' => array(
'users_fetched' => array('type' => 'list', 'label' => t('Fetched users')),
),
),
);
}
function sms_blast_rules_action_fetch_users()
{
return array('users_fetched' => user_load_multiple(
db_select('sms_user')
->fields('sms_user', array('uid', 'uid'))
->condition('status', 2, '=')
->execute()
->fetchAllKeyed()
));
}
Contribution Issue Link
Contribution Link
Files count
0
Patches count
0