From: Stéphane Jacob Date: Sat, 7 Aug 2010 16:20:16 +0000 (+0200) Subject: Prevents group animator from unsubscribing a non-subscribed account. X-Git-Tag: xorg/1.1.0~26^2~35 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4a648e80a1c914e3b942edb5097e3a06ccf521a9;p=platal.git Prevents group animator from unsubscribing a non-subscribed account. Signed-off-by: Stéphane Jacob --- 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'));