Closed (fixed)
Project:
Organic groups e-mail blast
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2011 at 14:54 UTC
Updated:
4 Jun 2012 at 05:03 UTC
function _group_emails($user, $group) {
$query = new EntityFieldQuery();
$query
->entityCondition('entity_type', 'user')
->fieldCondition(OG_AUDIENCE_FIELD, 'gid', $group->gid, '=');
if ($result = $query->execute()) {
$uids = array_keys($result['user']);
$accounts = user_load_multiple($uids);
$emails = array();
foreach ($accounts as $account) {
// We do not want the current user's e-mail
if ($account->uid != $user->uid) {
$emails[] = $account->mail;
}
}
return check_plain(implode(', ', $emails));
}
// Query did not execute.
return NULL;
}
Comments
Comment #1
dcmouyard commentedIs this still an issue? I wasn't able to reproduce the problem.
Comment #2
dcmouyard commentedComment #3
drupalycious commentedHello,
I am having the same problem, you changed the status to duplicate but could you indicate the issue it is a duplicate of?
I am a group administrator and when I try to send an email I get the following error messages:
and then it is written :
You are not authorized to access this page.Thanks
Comment #4
dcmouyard commented@sp-drupy I assume that you're getting this error when using the 2.x branch of Organic Groups. The 1.x branch of this module is only compatible with the 1.x branch of OG. If you're using the 2.x branch of OG, then use the 2.x branch of this module.
Comment #5
drupalycious commentedYes you are right I am using the 2.x branch.
Thank you for highlighting my mistake ;)
Comment #6
drupalycious commentedYou were right I was using the wrong version of your module.
Thanks
Issue closed