should stop beer ...
authorx2000habouzit <x2000habouzit>
Wed, 1 Sep 2004 22:15:54 +0000 (22:15 +0000)
committerx2000habouzit <x2000habouzit>
Wed, 1 Sep 2004 22:15:54 +0000 (22:15 +0000)
epouse is the wedding NAME  ...

only loginbis and alias go out from auth_user_md5 ...

htdocs/epouse.php
include/profil/get_general.inc.php
include/profil/get_poly.inc.php
scripts/migration.sql

index 23d102a..bedd433 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: epouse.php,v 1.5 2004-09-01 22:01:47 x2000habouzit Exp $
+        $Id: epouse.php,v 1.6 2004-09-01 22:15:54 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -26,11 +26,10 @@ require("validations.inc.php");
 
 new_skinned_page('epouse.tpl', AUTH_MDP);
 
-$res = $globals->db->query("SELECT  u.nom,a.alias  AS epouse,i.flags
-                              FROM  auth_user_md5  AS u
-                         LEFT JOIN  identification AS i USING(matricule)
-                         LEFT JOIN  aliases        AS a ON(u.user_id = a.id AND type='epouse')
-                             WHERE  user_id=".$_SESSION['uid']);
+$res = $globals->db->query("select u.nom,u.epouse,i.flags from auth_user_md5 as u
+                    left join identification as i using(matricule)
+                    where user_id=".$_SESSION['uid']);
+
 list($nom,$epouse_old,$flags) = mysql_fetch_row($res);
 $flags=new flagset($flags);
 $page->assign('is_femme',$flags->hasflag("femme"));
index 0e579fc..26a311b 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: get_general.inc.php,v 1.2 2004-09-01 21:55:32 x2000habouzit Exp $
+        $Id: get_general.inc.php,v 1.3 2004-09-01 22:15:54 x2000habouzit Exp $
  ***************************************************************************/
 
 // on ramène les données du profil connecté (uid paramètre de session)
@@ -27,11 +27,10 @@ $sql = "SELECT u.nom, u.prenom".
        ", mobile".
        ", web".
         ", libre".
-       ", u.alias".
+       ", alias".
        ", a1.aid, a1.type".
        ", a2.aid, a2.type".
        " FROM auth_user_md5 AS u".
-       " LEFT  JOIN aliases    AS a ON(u.user_id = a.id AND a.type='epouse')" .
        " LEFT  JOIN applis_ins AS a1 ON(a1.uid = u.user_id and a1.ordre = 0)".
        " LEFT  JOIN applis_ins AS a2 ON(a2.uid = u.user_id and a2.ordre = 1)".
        " LEFT  JOIN identification AS i ON(u.matricule = i.matricule) ".
index 26a0b2e..0caedbc 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: get_poly.inc.php,v 1.2 2004-09-01 21:55:32 x2000habouzit Exp $
+        $Id: get_poly.inc.php,v 1.3 2004-09-01 22:15:54 x2000habouzit Exp $
  ***************************************************************************/
 
 
 //declaration des fonctions msarty pour les binets et groupex
 
-$sql = "SELECT  u.nom, u.prenom, u.promo, a.alias as epouse, i.flags, section
-          FROM  auth_user_md5  AS u
-     LEFT JOIN  identification AS i ON(u.matricule = i.matricule)
-     LEFT JOIN  aliases               AS a ON(u.user_id = a.id AND type='epouse')
-         WHERE  user_id=".$_SESSION['uid'];
+$sql = "SELECT u.nom, u.prenom".
+    ", u.promo, epouse, i.flags, section".
+    " FROM auth_user_md5 AS u".
+    " LEFT  JOIN identification AS i ON(u.matricule = i.matricule) ".
+    " WHERE user_id=".$_SESSION['uid'];
 
 $result = $globals->db->query($sql);
 list($nom, $prenom, $promo, $epouse, $flags, $section) = mysql_fetch_row($result);
index 2a467f1..3ec396b 100644 (file)
@@ -33,7 +33,6 @@ INSERT INTO logger.actions SET text="connexion_auth_ext",description="connection
 -- drop des anciens alias --> aliases
 --*-- ALTER TABLE x4dat.auth_user_md5 DROP COLUMN loginbis;
 --*-- ALTER TABLE x4dat.auth_user_md5 DROP COLUMN alias;
---*-- ALTER TABLE x4dat.auth_user_md5 DROP COLUMN epouse;
 
 --------------------------------------------------------------------------------