No alerts work, when I select to send to a specific role, such as administrator.

Fix,
change, ':role' to :role,
i.e. change
$result = db_query("SELECT mail FROM {users} AS u INNER JOIN {users_roles} AS r ON u.uid = r.uid WHERE r.rid IN(':role') and u.status = '1' ", array(':role' => $roles));
to
$result = db_query("SELECT mail FROM {users} AS u INNER JOIN {users_roles} AS r ON u.uid = r.uid WHERE r.rid IN(:role) and u.status = '1' ", array(':role' => $roles));

Note, it can help to add:
watchdog('user_register_notify', 'email to=' . check_plain($to));
after:
$to = implode(', ', $emails);
to actually see in the logs who emails are sent to.

Comments

steingard’s picture

Nice. This works, thanks.

Dear maintainer, please commit.

hackwater’s picture

Seconded; also, I am including a patch file of boran's change.

hackwater’s picture

Issue summary: View changes

add debug tip

autopoietic’s picture

Issue summary: View changes

I can confirm patch in #2 works. Looks like this module may no longer be maintained?

knalstaaf’s picture

Status: Needs review » Reviewed & tested by the community

RTBC

hass’s picture

Fixed the code style issues.

  • hass committed 9e67a92 on 7.x-1.x
    Issue #1304262 by hackwater, hass: fix: incorrect parsing of 'Send to a...
hass’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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