HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Welcome emails set up to go to newsletters will go to people who have unsubscribed (#catalogues_509) - Comments

Login / Search

 [ Join | More ]
 
Title Welcome emails set up to go to newsletters will go to people who have unsubscribed
Description ocPortal allows you to configure welcome emails to go to newsletter subscribers. However it is not targeted to individual newsletters, just anyone with a newsletter account. Therefore emails may go to people who have explicitly removed themselves from all newsletters (the core accounts cannot be erased, but that is not an issue except for this bug).
Affects Users who have welcome emails set to go to newsletters
Fix In sources/hooks/systems/cron/ocf_welcome_emails.php change:

Code

               $where=' WHERE join_time>'.strval($last_cron_time-$send_seconds_after_joining).' AND join_time<='.strval($time_now-$send_seconds_after_joining);
               $members=$GLOBALS['SITE_DB']->query('SELECT email AS m_email_address FROM '.get_table_prefix().'newsletter'.$where);
to:

Code

               $where=' WHERE join_time>'.strval($last_cron_time-$send_seconds_after_joining).' AND join_time<='.strval($time_now-$send_seconds_after_joining).' AND (the_level=3 OR the_level=4)';
               $members=$GLOBALS['SITE_DB']->query('SELECT s.email AS m_email_address FROM '.get_table_prefix().'newsletter_subscribe s JOIN '.get_table_prefix().'newsletter n ON n.email=s.email '.$where.' GROUP BY s.email');

Back to the top

Comments / View



1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: