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

prunelle’s picture

I tried this code correction, and it seems to work with Drupal 5.6 and 5.7.

Thank you.

dgtlmoon’s picture

Status: Active » Fixed

thanks heaps! sorry about that, should be fixed in the next cvs overnight tarball

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.