presentation du bestalias au login
authorx2000chevalier <x2000chevalier>
Sun, 10 Oct 2004 09:09:34 +0000 (09:09 +0000)
committerx2000chevalier <x2000chevalier>
Sun, 10 Oct 2004 09:09:34 +0000 (09:09 +0000)
include/insert.password.inc.php

index f7519e0..1960be1 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: insert.password.inc.php,v 1.4 2004-09-02 19:39:20 x2000habouzit Exp $
+        $Id: insert.password.inc.php,v 1.5 2004-10-10 09:09:34 x2000chevalier Exp $
  ***************************************************************************/
 
 function smarty_insert_getName() {
@@ -37,7 +37,7 @@ function smarty_insert_getUsername() {
     if(isset($_COOKIE['ORGuid'])) $id = $_COOKIE['ORGuid'];
     if(isset($_SESSION['uid'])) $id = $_SESSION['uid'];
     if(empty($id)) return "";
-    $res = $globals->db->query("SELECT alias FROM aliases WHERE id='$id' AND type='a_vie'");
+    $res = $globals->db->query("SELECT alias FROM aliases WHERE id='$id' AND (type='a_vie' OR type='alias' OR type='epouse') ORDER BY type!='epouse', LENGTH(alias) LIMIT 1");
     if(list($uname) = mysql_fetch_row($res)) {
        mysql_free_result($res);
        return $uname;