Unsubscribes user from groupNL when unsubscribing from group.
[platal.git] / modules / xnetgrp.php
index cc39f46..0a40bae 100644 (file)
@@ -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;