Closed (fixed)
Project:
Action email role
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2008 at 18:49 UTC
Updated:
23 Feb 2008 at 00:01 UTC
The module sends emails to users in all roles in my version of Drupal, which is 5.2. I've marked this critical since the module is essentially non-functional.
The problem appears to be in the stored data structure. The module expects roles to be in the form rid=>rname, with just the selected roles, but it is stored as rid=>BOOLEAN, with all the roles as 0 or 1.
Replacing this code at line 43:
foreach($edit['recipient'] as $rid => $rname) {
$roles[]=$rid;
}
with this:
foreach($edit['recipient'] as $rid => $rname) {
if (!empty($rname)) {
$roles[]=$rid;
}
}
solves the problem for me.
Comments
Comment #1
prunelle commentedI tried this code correction, and it seems to work with Drupal 5.6 and 5.7.
Thank you.
Comment #2
dgtlmoon commentedthanks heaps! sorry about that, should be fixed in the next cvs overnight tarball
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.