We have a role to which we assign specific individual users and for which we do not want to send email reminders to. It would be great if, in the admin settings, we could select (tick) which roles we wanted to get the reminders.
I am not an expert so I couldn't hack a 'select role' into the admin front end but I imagine for an expert it might not be so hard.
Instead I have had to hack the module (around line 181-ish) so the select statement adds the relationship to the users_roles and then users_roles.rid <> X where X is the users_rol.rid we do not want to be emailed a reminder.
HACK =
... FROM ({users} u INNER JOIN {account_reminder} ar ON u.uid = ar.uid) LEFT JOIN users_roles ur on ar.uid = ur.uid WHERE u.login = 0 AND u.uid <> 0 AND u.status = 1 AND (ur.rid<>X or ur.rid IS NULL)", time());
...
Otherwise this works fine for us = thanks for the useful module.
Comments
Comment #1
jaydub commentedComment #2
jaydub commentedComment #3
jaydub commentedMade some headway on this but am stopped for the moment in the case where a user has multiple roles and not all roles are excluded. In that case with a NOT IN clause or something similar you will still get the user via the query since they have roles that are NOT excluded in addition to being excluded. will come back to this.
Comment #4
adam_b commentedI suspect that your initial hack would work for me as I'm dealing with a simple use-case without multiple roles... did you get any farther since April?
Comment #5
David_Rothstein commentedI had a similar need (to change the conditions under which the reminder e-mails are sent), but mine was different - it wasn't based on roles but rather on other conditions.
So I wrote a patch at #1799404: Add a hook to allow other modules to change the conditions under which account reminder e-mails are sent. If anyone needs the roles feature being proposed here, that patch would allow them to implement it in a separate module if they choose to.