From 4a648e80a1c914e3b942edb5097e3a06ccf521a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 7 Aug 2010 18:20:16 +0200 Subject: [PATCH] Prevents group animator from unsubscribing a non-subscribed account. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/xnetgrp.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index dbb2d07..7c777c8 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -825,6 +825,13 @@ class XnetGrpModule extends PLModule if (empty($user)) { return PL_NOT_FOUND; } + + global $globals; + + if (!$user->inGroup($globals->asso('id'))) { + pl_redirect('annuaire'); + } + $page->assign('self', false); $page->assign('user', $user); @@ -854,7 +861,6 @@ class XnetGrpModule extends PLModule // It the user has already logged in the site, we notify site // administrators that there is a new xnet account without any // group. - global $globals; $mailer = new PlMailer('xnetgrp/unsubscription.mail.tpl'); $mailer->assign('user', $user); $mailer->assign('groupId', $globals->asso('id')); -- 2.1.4