backport
authorx2002bobillot <x2002bobillot@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 9 Jan 2006 22:45:48 +0000 (22:45 +0000)
committerx2002bobillot <x2002bobillot@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 9 Jan 2006 22:45:48 +0000 (22:45 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@205 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs.net/groupe/annuaire-admin.php
htdocs.net/groupe/evt-admin.php
htdocs.net/groupe/membres-edit.php

index 22a7fe8..91c7b41 100644 (file)
@@ -34,7 +34,7 @@ foreach ($subscribers as $mail) {
         if (strstr($mail, '@polytechnique.org') === false) {
             $not_in_group_ext[] = $mail;
         } else {
-            $not_in_group_x = $mail;
+            $not_in_group_x[] = $mail;
         }
     }
 }
index 3894e40..5749e61 100644 (file)
@@ -27,17 +27,17 @@ if ($admin && Env::get('adm') && Env::get('mail')) {
                 "SELECT m.uid
                    FROM groupex.membres AS m
              INNER JOIN aliases AS a ON (a.id = m.uid)
-                  WHERE a.alias = {?}",
-                Env::get('mail'));
+                  WHERE a.alias = {?} AND m.asso_id = {?}",
+                Env::get('mail'), $globals->asso('id'));
     } else {
        $res = $globals->xdb->query(
                "SELECT m.uid
                   FROM groupex.membres AS m
                  WHERE m.email = {?} AND m.asso_id = {?}",
                Env::get('mail'), $globals->asso('id'));
-       $member = $res->fetchOneCell();
-       if (!$member) $page->trig("Membre introuvable");
     }
+    $member = $res->fetchOneCell();
+    if (!$member) $page->trig("Membre introuvable");
 }
 
 // change the price paid by a participant
index a57ea61..8209b1a 100644 (file)
@@ -59,7 +59,7 @@
                         FROM  auth_user_md5 AS u
                         INNER JOIN  aliases       AS a ON (u.user_id = a.id)
                         WHERE  a.alias={?}', $globals->asso('id'), $forlife);
-                        redirect('?edit='.$email);
+                        redirect($_SERVER['PHP_SELF'].'?edit='.$email);
                 } else {
                     $page->trig($email." n'est pas un alias polytechnique.org valide");
                 }
@@ -69,7 +69,7 @@
                     $uid = max(intval($res->fetchOneCell()), 50001);
                     $globals->xdb->execute('INSERT INTO  groupex.membres (uid,asso_id,origine,email) VALUES({?},{?},"ext",{?})',
                             $uid, $globals->asso('id'), $email);
-                    redirect('?edit='.$email);
+                    redirect($_SERVER['PHP_SELF'].'?edit='.$email);
                 } else {
                     $page->trig("« <strong>$email</strong> » n'est pas une adresse mail valide");
                 }