User can't remove identification footer from bug reports
[platal.git] / modules / xnetgrp.php
index 9c8cfe9..065d1a5 100644 (file)
@@ -383,12 +383,14 @@ class XnetGrpModule extends PLModule
                            m.perms='admin' AS admin,
                            m.origine='X' AS x,
                            u.perms!='pending' AS inscrit,
-                           m.uid
+                           m.uid, e.email AS actif
                      FROM  groupex.membres AS m
                 LEFT JOIN  auth_user_md5   AS u ON ( u.user_id = m.uid )
                 LEFT JOIN  aliases         AS a ON ( a.id = m.uid AND a.type='a_vie' )
+                LEFT JOIN  emails          AS e ON ( e.flags = 'active' AND e.uid = m.uid)
                     WHERE  m.asso_id = {?} $ini
                            AND (m.origine != 'X' OR u.perms != 'pending' OR m.email IS NOT NULL)
+                 GROUP BY  m.uid          
                  ORDER BY  $tri
                     LIMIT  {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE);
         $page->assign('ann', $ann);
@@ -443,7 +445,7 @@ class XnetGrpModule extends PLModule
             $vcard = new VCard($res->fetchColumn(), $photos == 'photos', 'Membre du groupe ' . $globals->asso('nom'));
             $vcard->do_page($page);
         } else {
-            return PL_NOTALLOWED;
+            return PL_FORBIDDEN;
         }
     }
 
@@ -990,6 +992,11 @@ class XnetGrpModule extends PLModule
                 $page->trig("L'intervalle de promotions est invalide");
                 Post::kill('valid');
             }
+
+            if (!trim($art['titre']) || !trim($art['texte'])) {
+                $page->trig("L'article doit avoir un titre et un contenu");
+                Post::kill('valid');
+            }
         }
 
         if (Post::v('valid') == 'Enregistrer') {