- Prevents welcome emails to be sent to unconfirmed subscribers

- Closes #384
This commit is contained in:
Vlad
2016-03-30 20:57:18 -04:00
parent 7c9029b227
commit d16eb87782
3 changed files with 30 additions and 13 deletions

View File

@ -12,6 +12,10 @@ class SubscriberSegment extends Model {
parent::__construct();
}
function subscriber() {
return $this->has_one(__NAMESPACE__.'\Subscriber', 'id');
}
static function setSubscriptions($subscriber, $segment_ids = array()) {
if($subscriber->id > 0) {
// unsubscribe from current subscriptions