Don't send signup confirmation when signup confirmation is disabled

Fixed issue with select2 not selecting values by default on newsletter send step
This commit is contained in:
Jonathan Labreuille
2016-09-29 15:42:44 +02:00
parent 1faa53b978
commit 8c5aebc7d6
2 changed files with 14 additions and 3 deletions

View File

@ -75,6 +75,10 @@ class Subscriber extends Model {
function sendConfirmationEmail() {
$signup_confirmation = Setting::getValue('signup_confirmation');
if((bool)$signup_confirmation['enabled'] === false) {
return false;
}
$segments = $this->segments()->findMany();
$segment_names = array_map(function($segment) {
return $segment->name;