Merge branch 'platal-0.10.0'
[platal.git] / plugins / insert.getUserName.php
index 08dd7df..bd7af29 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -23,14 +23,14 @@ function smarty_insert_getUsername()
 {
     global $globals;
 
-    $id = Cookie::i('ORGuid', -1);
+    $id = Cookie::i('uid', -1);
     $id = S::v($_SESSION['uid'], $id);
 
     if ($id<0) {
         return "";
     }
 
-    if (Cookie::v('ORGdomain', 'login') != 'alias') {
+    if (Cookie::v('domain', 'login') != 'alias') {
        $res = XDB::query("SELECT  alias FROM aliases
                                      WHERE  id={?} AND (type IN ('a_vie','alias') AND FIND_IN_SET('bestalias', flags))", $id);
        return $res->fetchOneCell();