diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index 7354912147eb9aa744f912b6ad3c47d7286d9238..7f4f00f823464670d81a75e180b520734db19646 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -156,7 +156,7 @@ if ($action == 'setsocid')
                     $thirdparty=new Societe($db);
                     $thirdparty->fetch(GETPOST("socid"));
                     $error++;
-                    $mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
+                    $mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'</div>';
                 }
             }
 
@@ -949,7 +949,7 @@ if ($rowid)
                 print '<tr class="bankswitchclass2 fieldrequireddyn"><td>'.$langs->trans('CheckTransmitter');
                 print ' <em>('.$langs->trans("ChequeMaker").')</em>';
                 print '</td>';
-                print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
+                print '<td><input id="fieldchqemetteur" name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->name:$_POST['chqemetteur']).'"></td></tr>';
 
                 print '<tr class="bankswitchclass2"><td>'.$langs->trans('Bank');
                 print ' <em>('.$langs->trans("ChequeBank").')</em>';
diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php
index 8b0a051e0b0f8f121027c8e8cf5c5914c5e4bd76..e0b8fca05e798696558a9031bbf01d063757da48 100755
--- a/htdocs/adherents/cartes/carte.php
+++ b/htdocs/adherents/cartes/carte.php
@@ -57,7 +57,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
     $arrayofmembers=array();
 
     // requete en prenant que les adherents a jour de cotisation
-    $sql = "SELECT d.rowid, d.prenom, d.nom, d.login, d.societe, d.datefin,";
+    $sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe, d.datefin,";
     $sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,";
     $sql.= " t.libelle as type,";
     $sql.= " p.libelle as pays";
@@ -81,8 +81,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
 
     		// List of values to scan for a replacement
             $substitutionarray = array (
-            '%PRENOM%'=>$objp->prenom,
-            '%NOM%'=>$objp->nom,
+            '%PRENOM%'=>$objp->firstname,
+            '%NOM%'=>$objp->lastname,
             '%LOGIN%'=>$objp->login,
             '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/",
             '%SOCIETE%'=>$objp->societe,
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 924c08dee2591161306f3dab82a889fa68c40c7a..e3ef158e436cf3be095b7412aacb934348b0f3e9 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -509,8 +509,10 @@ class Adherent extends CommonObject
                     if ($result >= 0)
                     {
                         $luser->civilite_id=$this->civilite_id;
-                        $luser->prenom=$this->prenom;
-                        $luser->nom=$this->nom;
+                        $luser->firstname=$this->firstname;
+                        $luser->lastname=$this->lastname;
+                        $luser->prenom=$this->firstname;    // deprecated
+                        $luser->nom=$this->lastname;        // deprecated
                         $luser->login=$this->user_login;
                         $luser->pass=$this->pass;
                         $luser->societe_id=$this->societe;
@@ -1000,19 +1002,19 @@ class Adherent extends CommonObject
                 $this->ref            = $obj->rowid;
                 $this->id             = $obj->rowid;
                 $this->civilite_id    = $obj->civilite;
-                $this->prenom         = $obj->firstname;
+                $this->prenom         = $obj->firstname;   // deprecated
                 $this->firstname      = $obj->firstname;
-                $this->nom            = $obj->lastname;
+                $this->nom            = $obj->lastname;    // deprecated
                 $this->lastname       = $obj->lastname;
                 $this->login          = $obj->login;
                 $this->pass           = $obj->pass;
                 $this->societe        = $obj->societe;
                 $this->fk_soc         = $obj->fk_soc;
-                $this->adresse        = $obj->address;	// TODO deprecated
+                $this->adresse        = $obj->address;	// deprecated
                 $this->address        = $obj->address;
-                $this->cp             = $obj->zip;		// TODO deprecated
+                $this->cp             = $obj->zip;		// deprecated
                 $this->zip            = $obj->zip;
-                $this->ville          = $obj->town;	    // TODO deprecated
+                $this->ville          = $obj->town;	    // deprecated
                 $this->town           = $obj->town;
 
                 $this->state_id       = $obj->fk_departement;
@@ -1427,7 +1429,7 @@ class Adherent extends CommonObject
         {
             $mdpass=dol_hash($this->pass);
             $htpass=crypt($this->pass,makesalt());
-            $query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->prenom." ".$this->nom."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
+            $query = "INSERT INTO spip_auteurs (nom, email, login, pass, htpass, alea_futur, statut) VALUES(\"".$this->firstname." ".$this->lastname."\",\"".$this->email."\",\"".$this->login."\",\"$mdpass\",\"$htpass\",FLOOR(32000*RAND()),\"1comite\")";
 
             $mydb=getDoliDBInstance('mysql',ADHERENT_SPIP_SERVEUR,ADHERENT_SPIP_USER,ADHERENT_SPIP_PASS,ADHERENT_SPIP_DB,ADHERENT_SPIP_PORT);
 
@@ -1683,12 +1685,16 @@ class Adherent extends CommonObject
      *		@param	Translate	$langs			Language object for translation of civility
      *		@param	int			$option			0=No option, 1=Add civility
      * 		@param	int			$nameorder		-1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
+     * 		@param	int			$maxlen			Maximum length
      * 		@return	string						String with full name
      */
-    function getFullName($langs,$option=0,$nameorder=-1)
+    function getFullName($langs,$option=0,$nameorder=-1,$maxlen=0)
     {
         global $conf;
 
+        if (empty($this->lastname))  $this->lastname=($this->name?$this->name:$this->nom);
+        if (empty($this->firstname)) $this->firstname=($this->firstname?$this->firstname:$this->prenom);
+
         $ret='';
         if ($option && $this->civilite_id)
         {
@@ -1701,17 +1707,17 @@ class Adherent extends CommonObject
 
         if ($nameorder)
         {
-            if ($this->prenom) $ret.=$this->prenom;
-            if ($this->prenom && $this->nom) $ret.=' ';
-            if ($this->nom)      $ret.=$this->nom;
+            $ret.=$this->firstname;
+            if ($this->firstname && $this->lastname) $ret.=' ';
+            $ret.=$this->lastname;
         }
         else
         {
-            if ($this->nom)      $ret.=$this->nom;
-            if ($this->prenom && $this->nom) $ret.=' ';
-            if ($this->prenom) $ret.=$this->prenom;
+            $ret.=$this->lastname;
+            if ($this->firstname && $this->lastname) $ret.=' ';
+            $ret.=$this->firstname;
         }
-        return trim($ret);
+        return dol_trunc($ret,$maxlen);
     }
 
 
@@ -1983,8 +1989,8 @@ class Adherent extends CommonObject
         $this->id=0;
         $this->specimen=1;
         $this->civilite_id = 0;
-        $this->nom = 'DOLIBARR';
-        $this->prenom = 'SPECIMEN';
+        $this->lastname = 'DOLIBARR';
+        $this->firstname = 'SPECIMEN';
         $this->login='dolibspec';
         $this->pass='dolibspec';
         $this->societe = 'Societe ABC';
diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php
index d7ddc80c463e6bb16bc75c3796411ddf4665280c..ee05be2e5ba0125a3744a55987984dce067f35f1 100644
--- a/htdocs/adherents/cotisations.php
+++ b/htdocs/adherents/cotisations.php
@@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu
 if ($msg)	print $msg.'<br>';
 
 // Liste des cotisations
-$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe,";
+$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe,";
 $sql.= " c.rowid as crowid, c.cotisation,";
 $sql.= " c.dateadh,";
 $sql.= " c.datef,";
@@ -123,7 +123,9 @@ if ($result)
         $cotisation->ref=$objp->crowid;
         $cotisation->id=$objp->crowid;
 
-        $adherent->ref=trim($objp->prenom.' '.$objp->nom);
+        $adherent->lastname=$objp->lastname;
+        $adherent->firstname=$objp->firstname;
+        $adherent->ref=$adherent->getFullName($langs);
         $adherent->id=$objp->rowid;
         $adherent->login=$objp->login;
 
diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php
index b71ba3dd48bb488f23497e617d68205931ad5c8b..2e83fa53e251dfaf8cbf769ddf6386ba9df06d6f 100644
--- a/htdocs/adherents/document.php
+++ b/htdocs/adherents/document.php
@@ -172,11 +172,11 @@ if ($id > 0)
         print '</tr>';
 
         // Nom
-        print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->nom.'&nbsp;</td>';
+        print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.'&nbsp;</td>';
         print '</tr>';
 
         // Prenom
-        print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.'&nbsp;</td>';
+        print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.'&nbsp;</td>';
         print '</tr>';
 
         // Status
diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php
index eeb716938caca32497fcee5000eae3e6108e63f3..950967b4eb4e8e1c7b6dbac57f1786a814ce864c 100644
--- a/htdocs/adherents/fiche.php
+++ b/htdocs/adherents/fiche.php
@@ -137,7 +137,7 @@ if ($_POST['action'] == 'setsocid')
 					$thirdparty=new Societe($db);
 					$thirdparty->fetch($_POST["socid"]);
 					$error++;
-					$errmsg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
+					$errmsg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->name).'</div>';
 				}
 			}
 
@@ -223,8 +223,10 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
 
 		// Change values
 		$object->civilite_id = trim($_POST["civilite_id"]);
-		$object->prenom      = trim($_POST["prenom"]);
-		$object->nom         = trim($_POST["nom"]);
+		$object->prenom      = trim($_POST["prenom"]);     // deprecated
+		$object->nom         = trim($_POST["nom"]);        // deprecated
+		$object->firstname   = trim($_POST["prenom"]);
+		$object->lastname    = trim($_POST["nom"]);
 		$object->login       = trim($_POST["login"]);
 		$object->pass        = trim($_POST["pass"]);
 
@@ -380,8 +382,10 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
     $socid=$_POST["socid"];
 
     $object->civilite_id = $civilite_id;
-    $object->prenom      = $prenom;
-    $object->nom         = $nom;
+    $object->prenom      = $prenom;    // deprecated
+    $object->nom         = $nom;       // deprecated
+    $object->firstname   = $prenom;
+    $object->lastname    = $nom;
     $object->societe     = $societe;
     $object->adresse     = $address; // deprecated
     $object->address     = $address;
@@ -692,11 +696,11 @@ if ($action == 'create')
     print '</tr>';
 
     // Lastname
-    print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->nom).'" size="40"></td>';
+    print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->lastname).'" size="40"></td>';
     print '</tr>';
 
     // Firstname
-    print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->prenom).'"></td>';
+    print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>';
     print '</tr>';
 
     // Password
@@ -923,11 +927,11 @@ if ($action == 'edit')
 	print '</tr>';
 
 	// Name
-	print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->nom).'"></td>';
+	print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$object->lastname).'"></td>';
 	print '</tr>';
 
 	// Firstname
-	print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->prenom).'"></td>';
+	print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>';
 	print '</tr>';
 
 	// Password
@@ -1074,9 +1078,9 @@ if ($rowid && $action != 'edit')
 		{
 			// Full firstname and name separated with a dot : firstname.name
 			include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
-			$login=dol_buildlogin($object->nom,$object->prenom);
+			$login=dol_buildlogin($object->lastname,$object->firstname);
 		}
-		if (empty($login)) $login=strtolower(substr($object->prenom, 0, 4)) . strtolower(substr($object->nom, 0, 4));
+		if (empty($login)) $login=strtolower(substr($object->firstname, 0, 4)) . strtolower(substr($object->lastname, 0, 4));
 
 		// Create a form array
 		$formquestion=array(
@@ -1246,11 +1250,11 @@ if ($rowid && $action != 'edit')
 	print '</tr>';
 
     // Name
-    print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->nom.'&nbsp;</td>';
+    print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$object->lastname.'&nbsp;</td>';
 	print '</tr>';
 
     // Firstname
-    print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->prenom.'&nbsp;</td></tr>';
+    print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.'&nbsp;</td></tr>';
 
 	// Password
     if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index 1f04032179aab664ab54f8ed038ecfd508c16dc8..dc3d8f3c68967bff95d9ab6393a165f3f5b4f1ad 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -203,7 +203,7 @@ $var=true;
  */
 $max=5;
 
-$sql = "SELECT a.rowid, a.statut, a.nom, a.prenom,";
+$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,";
 $sql.= " a.tms as datem, datefin as date_end_subscription,";
 $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
 $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
@@ -229,8 +229,8 @@ if ($resql)
 			$obj = $db->fetch_object($resql);
 			print "<tr ".$bc[$var].">";
 			$staticmember->id=$obj->rowid;
-			$staticmember->nom=$obj->nom;
-			$staticmember->prenom=$obj->prenom;
+			$staticmember->lastname=$obj->lastname;
+			$staticmember->firstname=$obj->firstname;
 			$staticmember->ref=$staticmember->getFullName($langs);
 			$statictype->id=$obj->typeid;
 			$statictype->libelle=$obj->libelle;
@@ -283,8 +283,8 @@ if ($resql)
 			$subscriptionstatic->id=$obj->cid;
 			$subscriptionstatic->ref=$obj->cid;
 			$staticmember->id=$obj->rowid;
-			$staticmember->nom=$obj->nom;
-			$staticmember->prenom=$obj->prenom;
+			$staticmember->lastname=$obj->lastname;
+			$staticmember->firstname=$obj->firstname;
 			$staticmember->ref=$staticmember->getFullName($langs);
 			print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
 			print '<td>'.$staticmember->getNomUrl(1,24,'subscription').'</td>';
diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php
index 39a00c6444e41a7858ae08f9e6f358c25bc344b4..5e3456c2cfdb7cac2f5feedd511796016b33b6a0 100644
--- a/htdocs/adherents/ldap.php
+++ b/htdocs/adherents/ldap.php
@@ -109,11 +109,11 @@ print $form->showrefnav($adh,'id');
 print '</td></tr>';
 
 // Nom
-print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->nom.'&nbsp;</td>';
+print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.'&nbsp;</td>';
 print '</tr>';
 
 // Prenom
-print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->prenom.'&nbsp;</td>';
+print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.'&nbsp;</td>';
 print '</tr>';
 
 // Login
diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php
index 625ab0355b37068455558160608c4492859fef29..a88056930b7afe22d132ec4e5af8dba92c41356f 100644
--- a/htdocs/adherents/liste.php
+++ b/htdocs/adherents/liste.php
@@ -79,7 +79,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute
 
 $now=dol_now();
 
-$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
+$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as name, d.societe, ";
 $sql.= " d.datefin,";
 $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
 $sql.= " t.libelle as type, t.cotisation";
@@ -258,8 +258,8 @@ if ($resql)
 		// Nom
 		$var=!$var;
 		print "<tr ".$bc[$var].">";
-		$memberstatic->nom=$objp->nom;
-		$memberstatic->prenom=$objp->prenom;
+		$memberstatic->lastname=$objp->lastname;
+		$memberstatic->firstname=$objp->firstname;
 		if ($objp->societe != '')
 		{
 			print "<td><a href=\"fiche.php?rowid=$objp->rowid\">".img_object($langs->trans("ShowMember"),"user").' '.dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."</a></td>\n";
diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php
index a5a285da3417a9fde92a6b7a4fedecea88639a6e..7c36b2414aae3319c3a7cc5aff890acd0d6dc526 100644
--- a/htdocs/adherents/note.php
+++ b/htdocs/adherents/note.php
@@ -120,11 +120,11 @@ if ($id)
     print '</tr>';
 
     // Lastname
-    print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$adh->nom.'&nbsp;</td>';
+    print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$adh->lastname.'&nbsp;</td>';
 	print '</tr>';
 
     // Firstname
-    print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$adh->prenom.'&nbsp;</td></tr>';
+    print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$adh->firstname.'&nbsp;</td></tr>';
 
     // Status
     print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$adh->getLibStatut(4).'</td></tr>';
diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index 470793fe1e5261cb79547120b87428863ff89a56..ea15f11b1ed31d549476a021963b9a5630cb8b57 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -338,7 +338,7 @@ if ($rowid > 0)
 
 		$membertypestatic=new AdherentType($db);
 
-		$sql = "SELECT d.rowid, d.login, d.prenom, d.nom, d.societe, ";
+		$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe, ";
 		$sql.= " d.datefin,";
 		$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
 		$sql.= " t.libelle as type, t.cotisation";
@@ -486,17 +486,19 @@ if ($rowid > 0)
 		        $datefin=$db->jdate($objp->datefin);
 
 		        $adh=new Adherent($db);
+		        $adh->lastname=$objp->lastname;
+		        $adh->firstname=$objp->firstname;
 
 		        // Nom
 		        $var=!$var;
 		        print '<tr '.$bc[$var].'>';
 		        if ($objp->societe != '')
 		        {
-		            print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom.' '.dol_trunc($objp->nom,12).' / '.dol_trunc($objp->societe,12).'</a></td>'."\n";
+		            print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).'</a></td>'."\n";
 		        }
 		        else
 		        {
-		            print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$objp->prenom.' '.dol_trunc($objp->nom).'</a></td>'."\n";
+		            print '<td><a href="fiche.php?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,32).'</a></td>'."\n";
 		        }
 
 		        // Login
@@ -627,7 +629,7 @@ if ($rowid > 0)
 		print "</td></tr>";
 
 		print '</table>';
-		
+
 		print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"> &nbsp; &nbsp;';
 		print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
 
diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php
index bbd5883f28301f1e9eda01a470cbcd51788adaf5..4c30cb89eef9975987c9a46469d193f74fbecbe1 100644
--- a/htdocs/asterisk/cidlookup.php
+++ b/htdocs/asterisk/cidlookup.php
@@ -40,7 +40,7 @@ if (empty($phone))
 	exit;
 }
 
-$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe as s";
+$sql = "SELECT nom as name FROM ".MAIN_DB_PREFIX."societe as s";
 $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid";
 $sql.= " WHERE s.entity=".$conf->entity;
 $sql.= " AND (s.tel='".$db->escape($phone)."'";
@@ -53,10 +53,10 @@ dol_syslog('cidlookup search information with phone '.$phone, LOG_DEBUG);
 $resql = $db->query($sql);
 if ($resql)
 {
-	$row = $db->fetch_object($resql);
-	if ($row)
+	$obj = $db->fetch_object($resql);
+	if ($obj)
 	{
-		$found = $row->nom;
+		$found = $obj->name;
 	}
 	$db->free($resql);
 }
diff --git a/htdocs/bookmarks/fiche.php b/htdocs/bookmarks/fiche.php
index 1e9a3cd23bc75ba46322011a71bdda9c5629056e..67bd962e747cef4e793dfa943f31cd4cd028c34e 100644
--- a/htdocs/bookmarks/fiche.php
+++ b/htdocs/bookmarks/fiche.php
@@ -230,7 +230,6 @@ if ($_GET["id"] > 0 && ! preg_match('/^add/i',$_GET["action"]))
 		{
 			$fuser=new User($db);
 			$fuser->fetch($bookmark->fk_user);
-			//$fuser->nom=$fuser->login; $fuser->prenom='';
 			print $fuser->getNomUrl(1);
 		}
 		else
diff --git a/htdocs/bookmarks/liste.php b/htdocs/bookmarks/liste.php
index a9664d8dc861a97e60fef3f668ac97e84da13bc4..10bbd015cf67dd3d6f6eb82c46f7adf8e71ad25f 100644
--- a/htdocs/bookmarks/liste.php
+++ b/htdocs/bookmarks/liste.php
@@ -127,7 +127,7 @@ if ($resql)
                 require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
                 $societe=new Societe($db);
                 $societe->fetch($obj->rowid);
-                $obj->title=$societe->nom;
+                $obj->title=$societe->name;
             }
             $title=img_object($langs->trans("ShowCompany"),"company").' '.$obj->title;
         }
diff --git a/htdocs/boutique/client/class/boutiqueclient.class.php b/htdocs/boutique/client/class/boutiqueclient.class.php
index 837afb5497ce615df91073ff2d601cbc7d1b803f..a84b81ed6a7e940e4d62480c68a03f7b5ea6ade2 100644
--- a/htdocs/boutique/client/class/boutiqueclient.class.php
+++ b/htdocs/boutique/client/class/boutiqueclient.class.php
@@ -37,11 +37,11 @@ class BoutiqueClient
 	/**
 	 * 	Constructor
 	 *
-	 * 	@param		DoliDB	$DB		Database handler
+	 * 	@param		DoliDB	$db		Database handler
 	 */
-    function BoutiqueClient($DB)
+    function BoutiqueClient($db)
     {
-        $this->db = $DB;
+        $this->db = $db;
     }
 
     /**
diff --git a/htdocs/boutique/client/fiche.php b/htdocs/boutique/client/fiche.php
index 85e2c8f99b4121310c52a5b6a4c37b7780dda69f..bd6428684e49061eb79fa703b23f7871c42ae59a 100644
--- a/htdocs/boutique/client/fiche.php
+++ b/htdocs/boutique/client/fiche.php
@@ -33,12 +33,7 @@ include_once(DOL_DOCUMENT_ROOT.'/boutique/client/class/boutiqueclient.class.php'
  * Actions
  */
 
-if ($action == 'update' && !$cancel)
-{
-	$client = new BoutiqueClient($dbosc);
-	$client->nom = $nom;
-	$client->update($id, $user);
-}
+// None
 
 
 
diff --git a/htdocs/boutique/notification/fiche.php b/htdocs/boutique/notification/fiche.php
deleted file mode 100644
index a1071d71ddb5dec019c485066c5d4ec03b355e0f..0000000000000000000000000000000000000000
--- a/htdocs/boutique/notification/fiche.php
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-/* Copyright (C) 2003      Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- *	    \file       htdocs/boutique/notification/fiche.php
- *		\ingroup    boutique
- *		\brief      Page fiche notification OS Commerce
- */
-
-require("../../main.inc.php");
-require_once(DOL_DOCUMENT_ROOT.'/boutique/osc_master.inc.php');
-
-
-/*
- * View
- */
-
-llxHeader();
-
-if ($action == 'add') {
-  $editeur = new Editeur($dbosc);
-
-  $editeur->nom = $nom;
-
-  $id = $editeur->create($user);
-}
-
-if ($action == 'addga') {
-  $editeur = new Editeur($dbosc);
-
-  $editeur->linkga($id, $ga);
-}
-
-
-if ($action == 'update' && !$cancel) {
-  $editeur = new Editeur($dbosc);
-
-  $editeur->nom = $nom;
-
-  $editeur->update($id, $user);
-}
-
-/*
- *
- *
- */
-if ($action == 'create')
-{
-
-  print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
-  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
-  print '<input type="hidden" name="action" value="add">';
-
-  print '<div class="titre">Nouvel Editeur</div><br>';
-
-  print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
-  print "<tr>";
-  print '<td>Nom</td><td><input name="nom" size="40" value=""></td></tr>';
-  print '<tr><td>&nbsp;</td><td><input type="submit" value="Cr�er"></td></tr>';
-  print '</table>';
-  print '</form>';
-
-
-}
-else
-{
-  if ($id)
-    {
-
-      $editeur = new Editeur($dbosc);
-      $result = $editeur->fetch($id);
-
-      if ( $result )
-	{
-	  if ($action == 'edit')
-	    {
-	      print '<div class="titre">Edition de la fiche Editeur : '.$editeur->titre.'</div><br>';
-
-	      print "<form action=\"fiche.php?id=$id\" method=\"post\">\n";
-	      print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
-	      print '<input type="hidden" name="action" value="update">';
-
-	      print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
-	      print "<tr>";
-	      print '<td width="20%">Nom</td><td><input name="nom" size="40" value="'.$editeur->nom.'"></td>';
-
-
-	      print '<tr><td colspan="2" align="center"><input type="submit" value="'.$langs->trans("Save").'">&nbsp;<input type="submit" value="'.$langs->trans("Cancel").'" name="cancel"></td></tr>';
-
-	      print '</form>';
-
-	      print '</table><hr>';
-
-	    }
-
-	  print '<div class="titre">Fiche Editeur : '.$editeur->titre.'</div><br>';
-
-	  print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
-	  print "<tr>";
-	  print '<td width="20%">Nom</td><td width="30%">'.$editeur->nom.'</td></tr>';
-	  print "</table>";
-
-
-
-	}
-      else
-	{
-	  print "Fetch failed";
-	}
-
-
-    }
-  else
-    {
-      print "Error";
-    }
-}
-
-/* ************************************************************************** */
-/*                                                                            */
-/* Barre d'action                                                             */
-/*                                                                            */
-/* ************************************************************************** */
-
-
-print '<div class="tabsAction">';
-if ($action != 'create')
-{
-  print '<a class="butAction" href="fiche.php?action=edit&id='.$id.'">'.$langs->trans("Modify").'</a>';
-}
-print '</div>';
-
-
-$dbosc->close();
-
-llxFooter();
-?>
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 95916e0638816ef0cf23d49ed68d92174f28de94..c3512c1b7d1d3a22d84fb90136cc9b480c6021ea 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -678,7 +678,7 @@ class Societe extends CommonObject
 
                 $this->ref          = $obj->rowid;
                 $this->name 		= $obj->name;
-                $this->nom          = $obj->name;		// TODO obsolete
+                $this->nom          = $obj->name;		// deprecated
                 $this->ref_ext      = $obj->ref_ext;
                 $this->ref_int      = $obj->ref_int;
 
@@ -1333,6 +1333,8 @@ class Societe extends CommonObject
     {
         global $conf,$langs;
 
+        $name=$this->name?$this->name:$this->nom;
+
         $result='';
         $lien=$lienfin='';
 
@@ -1365,8 +1367,6 @@ class Societe extends CommonObject
         $lien.=(!empty($this->canvas)?'&amp;canvas='.$this->canvas:'').'">';
         $lienfin='</a>';
 
-        $name=$this->name?$this->name:$this->nom;
-
         if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
         if ($withpicto && $withpicto != 2) $result.=' ';
         $result.=$lien.($maxlen?dol_trunc($name,$maxlen):$name).$lienfin;
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index a1b95bec331ed5b0b01364f24cc076aa67ce4d41..9162dc04e390bf60c1060d2f5530c2ab76c8fd8e 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -75,7 +75,7 @@ class UserGroup extends CommonObject
 
 		$this->id = $id;
 
-		$sql = "SELECT g.rowid, g.entity, g.nom, g.note, g.datec, g.tms as datem";
+		$sql = "SELECT g.rowid, g.entity, g.nom as name, g.note, g.datec, g.tms as datem";
 		$sql.= " FROM ".MAIN_DB_PREFIX."usergroup as g";
 		$sql.= " WHERE g.rowid = ".$this->id;
 
@@ -90,7 +90,8 @@ class UserGroup extends CommonObject
 				$this->id = $obj->rowid;
 				$this->ref = $obj->rowid;
 				$this->entity = $obj->entity;
-				$this->nom  = $obj->nom;
+				$this->nom  = $obj->name;        // depecated
+				$this->name = $obj->name;
 				$this->note = $obj->note;
 				$this->datec = $obj->datec;
 				$this->datem = $obj->datem;
@@ -106,7 +107,7 @@ class UserGroup extends CommonObject
 		else
 		{
 			$this->error=$this->db->lasterror();
-			dol_syslog(get_class($this)."::Fetch ".$this->error, LOG_ERR);
+			dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR);
 			return -1;
 		}
 	}
diff --git a/scripts/company/export-contacts-xls-example.php b/scripts/company/export-contacts-xls-example.php
index 613f4b524957bfe751b3a3f1519a76d4bf4c0e4a..bdef2e43d4018a54d2c0c8fb57b0850aff05ee35 100644
--- a/scripts/company/export-contacts-xls-example.php
+++ b/scripts/company/export-contacts-xls-example.php
@@ -70,7 +70,7 @@ $objPHPExcel->getActiveSheet()->setTitle('Contacts');
 
 //$page->set_column(0,4,18); // A
 
-$sql = "SELECT distinct c.name, c.firstname, c.email, s.nom";
+$sql = "SELECT distinct c.name as lastname, c.firstname, c.email, s.nom as name";
 $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c";
 $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = c.fk_soc";
 
@@ -84,27 +84,19 @@ if ($resql)
 	$i = 0;
 	$j = 1;
 
-	//$page->write_string(0, 0,  $langs->trans("ThirdParty"));
 	$objPHPExcel->getActiveSheet()->SetCellValue('A1', $langs->trans("Firstname"));
-	//$page->write_string(0, 1,  $langs->trans("Firstname"));
 	$objPHPExcel->getActiveSheet()->SetCellValue('B1', $langs->trans("Lastname"));
-	//$page->write_string(0, 2,  $langs->trans("Lastname"));
 	$objPHPExcel->getActiveSheet()->SetCellValue('C1', $langs->trans("Email"));
-	//$page->write_string(0, 3,  $langs->trans("Email"));
 	$objPHPExcel->getActiveSheet()->SetCellValue('D1', $langs->trans("ThirdPart"));
 
 	while ($i < $num)
 	{
 		$obj = $db->fetch_object($resql);
 
-		//$page->write_string($j, 0,  $obj->nom);
     	$objPHPExcel->getActiveSheet()->SetCellValue('A'.($i+2), $obj->firstname);
-		//$page->write_string($j, 1,  $obj->firstname);
-    	$objPHPExcel->getActiveSheet()->SetCellValue('B'.($i+2), $obj->name);
-		//$page->write_string($j, 2,  $obj->name);
+    	$objPHPExcel->getActiveSheet()->SetCellValue('B'.($i+2), $obj->lastname);
     	$objPHPExcel->getActiveSheet()->SetCellValue('C'.($i+2), $obj->email);
-		//$page->write_string($j, 3,  $obj->email);
-    	$objPHPExcel->getActiveSheet()->SetCellValue('D'.($i+2), $obj->nom);
+    	$objPHPExcel->getActiveSheet()->SetCellValue('D'.($i+2), $obj->name);
 
 		$j++;
 		$i++;
diff --git a/scripts/emailings/mailing-send.php b/scripts/emailings/mailing-send.php
index 9a456a7376799f1b5ce671fb56a513784c973e39..aaf966eb3dc254a748adedb426b214c370655efd 100644
--- a/scripts/emailings/mailing-send.php
+++ b/scripts/emailings/mailing-send.php
@@ -93,7 +93,7 @@ $nbok=0; $nbko=0;
 
 // On choisit les mails non deja envoyes pour ce mailing (statut=0)
 // ou envoyes en erreur (statut=-1)
-$sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type";
+$sql = "SELECT mc.rowid, mc.nom as lastname, mc.prenom as firstname, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type";
 $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
 $sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$id;
 
@@ -123,7 +123,7 @@ if ($resql)
 			$obj = $db->fetch_object($resql);
 
 			// sendto en RFC2822
-			$sendto = str_replace(',',' ',$obj->prenom." ".$obj->nom) ." <".$obj->email.">";
+			$sendto = str_replace(',',' ',$obj->firstname." ".$obj->lastname) ." <".$obj->email.">";
 
 			// Make subtsitutions on topic and body
 			$other=explode(';',$obj->other);
@@ -135,8 +135,8 @@ if ($resql)
 			$substitutionarray=array(
 				'__ID__' => $obj->source_id,
 				'__EMAIL__' => $obj->email,
-				'__LASTNAME__' => $obj->nom,
-				'__FIRSTNAME__' => $obj->prenom,
+				'__LASTNAME__' => $obj->lastname,
+				'__FIRSTNAME__' => $obj->firstname,
 				'__OTHER1__' => $other1,
 				'__OTHER2__' => $other2,
 				'__OTHER3__' => $other3,
diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php
index ea7ad07159961e68585d7c1b788690dc295b4b17..5007e69b5a63e8b4acac3712105d74bc142afcee 100644
--- a/scripts/invoices/email_unpaid_invoices_to_representatives.php
+++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php
@@ -47,7 +47,7 @@ require_once (DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
 
 $error = 0;
 
-$sql = "SELECT f.facnumber, f.total_ttc, s.nom, u.name, u.firstname, u.email";
+$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.name, u.firstname, u.email";
 $sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
 $sql .= " , ".MAIN_DB_PREFIX."societe as s";
 $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@@ -85,7 +85,7 @@ if ($resql)
                 $total = 0;
             }
 
-            $message .= "Facture ".$obj->facnumber." : ".price($obj->total_ttc)." : ".$obj->nom."\n";
+            $message .= "Facture ".$obj->facnumber." : ".price($obj->total_ttc)." : ".$obj->name."\n";
             $total += $obj->total_ttc;
 
             dol_syslog("email_unpaid_invoices_to_representatives.php: ".$obj->email);
diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php
index 37a7898527eea5c9bbf20734a5778e9ccb180100..b54d3f1a33ea111218b907183925af94ec1fc50e 100644
--- a/scripts/members/sync_members_ldap2dolibarr.php
+++ b/scripts/members/sync_members_ldap2dolibarr.php
@@ -181,23 +181,25 @@ if ($result >= 0)
 			$member = new Adherent($db);
 
 			// Propriete membre
-			$member->prenom=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME];
-			$member->nom=$ldapuser[$conf->global->LDAP_FIELD_NAME];
+			$member->prenom=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME];    // deprecated
+			$member->nom=$ldapuser[$conf->global->LDAP_FIELD_NAME];            // deprecated
+			$member->firstname=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME];
+			$member->lastname=$ldapuser[$conf->global->LDAP_FIELD_NAME];
 			$member->login=$ldapuser[$conf->global->LDAP_FIELD_LOGIN];
 			$member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD];
 
 			//$member->societe;
-			$member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // TODO obsolete
+			$member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS];   // deprecated
 			$member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS];
-			$member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP];    // TODO obsolete
+			$member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP];            // deprecated
 			$member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP];
-			$member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN];    // TODO obsolete
+			$member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN];        // deprecated
 			$member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN];
-			$member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY];	// TODO obsolete
+			$member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY];	     // deprecated
 			$member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY];
-			$member->pays_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid'];    // TODO obsolete
+			$member->pays_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid'];    // deprecated
 			$member->country_id=$countries[$hashlib2rowid[strtolower($member->country)]]['rowid'];
-			$member->pays_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code'];    // TODO obsolete
+			$member->pays_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code'];   // deprecated
 			$member->country_code=$countries[$hashlib2rowid[strtolower($member->country)]]['code'];
 
 			$member->phone=$ldapuser[$conf->global->LDAP_FIELD_PHONE];
diff --git a/scripts/user/sync_groups_dolibarr2ldap.php b/scripts/user/sync_groups_dolibarr2ldap.php
index 8eaa50518947b54d129730ccb00e32fe5cc778cf..0deafa514e9cef45f693ea75804f27d5d392bc84 100644
--- a/scripts/user/sync_groups_dolibarr2ldap.php
+++ b/scripts/user/sync_groups_dolibarr2ldap.php
@@ -82,7 +82,7 @@ if ($resql)
 		$fgroup->id = $obj->rowid;
 		$fgroup->fetch($fgroup->id);
 
-		print $langs->trans("UpdateGroup")." rowid=".$fgroup->id." ".$fgroup->nom;
+		print $langs->trans("UpdateGroup")." rowid=".$fgroup->id." ".$fgroup->name;
 
 		$oldobject=$fgroup;