Hi,
I've started experimenting with this module to send an email to all authenticated users, but it only seem to sent to users whose accounts are enabled.
This is probably by design, but in my case I've many (imported) users who are disabled and I'd to inform then of events.
browding though the code the following seems like it might be the place that limits emails to active users:
mass_contact.module, line 1303
$recipients = db_query("SELECT name, mail, uid FROM {users} WHERE status <> %d AND uid > %d", 0, 0);
Is that the right place to remove the status check?
Is there an alternative way to do this without hacking module, perhaps there is a relevant feature in the new dev release?
Thanks in advance,
Sean
Comment | File | Size | Author |
---|---|---|---|
#13 | 787168-13.patch | 6.18 KB | robertragas |
#12 | 787168-9.patch | 5.62 KB | robertragas |
#8 | 787168-8.patch | 4.89 KB | SV |
Comments
Comment #1
oadaeh CreditAttribution: oadaeh commentedBased on the line number you mentioned, it seems to me the version you are using is not the same one you have selected in this issue. You might want to double check which version you are using.
As a disclaimer, I did not test the changes I mention below. They should work fine, but there may be an error in what I pasted, so you should test them before you make them live.
There are four lines you would need to change:
At about line 1278, from:
to:
At about line 1280, from:
to:
At about line 1296, from:
to:
At about line 1309, from:
to:
Comment #2
boran CreditAttribution: boran commentedThanks, the line number was wrng in my initial post. You suggestions make sense and do not cause any errors, I'll now do some testing .
Thanks.
Comment #3
oadaeh CreditAttribution: oadaeh commentedTweaking the title.
Comment #4
oadaeh CreditAttribution: oadaeh commentedComment #5
oadaeh CreditAttribution: oadaeh commentedMarked #937400: Sending e-mail to inactive users. as a duplicate of this.
Comment #6
oadaeh CreditAttribution: oadaeh commentedMarked #912756: Mass contact blocked as a duplicate of this (back on September 15, 2010).
Comment #7
oadaeh CreditAttribution: oadaeh commentedThanks to ygerasimov, the 7.x-1.x version of Mass Contact now utilizes the Chaos tools suite (ctools) plugin system. I will reexamine this and realted issues with that plugin system in mind to determine whether to create a plugin for this request or not.
Comment #8
SV CreditAttribution: SV commentedFollowing patch provides "User status" options on the category page. So, administrator will be able to create a category and sent email to every users (blocked or active).
Comment #10
SV CreditAttribution: SV commentedComment #11
robertragas CreditAttribution: robertragas commentedPatch not working like expected. The options for user_status are not saving correctly.
Comment #12
robertragas CreditAttribution: robertragas commentedAdded a patch where I changed it and should work now, but think the code still could use optimization.
Comment #13
robertragas CreditAttribution: robertragas commented