From: x2000chevalier Date: Sun, 10 Oct 2004 09:09:34 +0000 (+0000) Subject: presentation du bestalias au login X-Git-Tag: xorg/old~1344 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=dc81469e77774acb664a0a4e1ac3bea682eef7fe;p=platal.git presentation du bestalias au login --- diff --git a/include/insert.password.inc.php b/include/insert.password.inc.php index f7519e0..1960be1 100644 --- a/include/insert.password.inc.php +++ b/include/insert.password.inc.php @@ -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;