From ce4c816ec017cefb265860c366b56e7425c61cb6 Mon Sep 17 00:00:00 2001 From: Anne Limoges Date: Sat, 8 Mar 2014 14:38:55 +0100 Subject: [PATCH] Unsubscribes user from groupNL when unsubscribing from group. --- modules/xnetgrp.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index cc39f46..0a40bae 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -1222,6 +1222,11 @@ class XnetGrpModule extends PLModule $mailer->send(); } + $nl = Newsletter::forGroup($globals->asso('shortname')); + if (!is_null($nl)) { + $nl->unsubscribe(null, S::i('uid')); + } + $domain = $globals->asso('mail_domain'); if (!$domain) { return true; -- 2.1.4