Skip to content

Commit

Permalink
Fix: uniform code
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Jan 7, 2012
1 parent 1201424 commit 2713099
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions htdocs/user/class/user.class.php
Expand Up @@ -4,7 +4,7 @@
* Copyright (c) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
*
Expand Down Expand Up @@ -1724,15 +1724,15 @@ function getFullName($langs,$option=0,$nameorder=-1)

if ($nameorder)
{
if ($this->prenom) $ret.=$this->prenom;
if ($this->prenom && $this->nom) $ret.=' ';
if ($this->nom) $ret.=$this->nom;
if ($this->firstname) $ret.=$this->firstname;
if ($this->firstname && $this->lastname) $ret.=' ';
if ($this->lastname) $ret.=$this->lastname;
}
else
{
if ($this->nom) $ret.=$this->nom;
if ($this->prenom && $this->nom) $ret.=' ';
if ($this->prenom) $ret.=$this->prenom;
if ($this->lastname) $ret.=$this->lastname;
if ($this->firstname && $this->lastname) $ret.=' ';
if ($this->firstname) $ret.=$this->firstname;
}

return trim($ret);
Expand Down Expand Up @@ -1833,8 +1833,8 @@ function _load_ldap_info()

// Champs
if ($this->fullname && $conf->global->LDAP_FIELD_FULLNAME) $info[$conf->global->LDAP_FIELD_FULLNAME] = $this->fullname;
if ($this->nom && $conf->global->LDAP_FIELD_NAME) $info[$conf->global->LDAP_FIELD_NAME] = $this->nom;
if ($this->prenom && $conf->global->LDAP_FIELD_FIRSTNAME) $info[$conf->global->LDAP_FIELD_FIRSTNAME] = $this->prenom;
if ($this->nom && $conf->global->LDAP_FIELD_NAME) $info[$conf->global->LDAP_FIELD_NAME] = $this->lastname;
if ($this->prenom && $conf->global->LDAP_FIELD_FIRSTNAME) $info[$conf->global->LDAP_FIELD_FIRSTNAME] = $this->firstname;
if ($this->login && $conf->global->LDAP_FIELD_LOGIN) $info[$conf->global->LDAP_FIELD_LOGIN] = $this->login;
if ($this->login && $conf->global->LDAP_FIELD_LOGIN_SAMBA) $info[$conf->global->LDAP_FIELD_LOGIN_SAMBA] = $this->login;
if ($this->pass && $conf->global->LDAP_FIELD_PASSWORD) $info[$conf->global->LDAP_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
Expand All @@ -1850,8 +1850,8 @@ function _load_ldap_info()
if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers";
}
if ($this->address && $conf->global->LDAP_FIELD_ADDRESS) $info[$conf->global->LDAP_FIELD_ADDRESS] = $this->address;
if ($this->cp && $conf->global->LDAP_FIELD_ZIP) $info[$conf->global->LDAP_FIELD_ZIP] = $this->cp;
if ($this->ville && $conf->global->LDAP_FIELD_TOWN) $info[$conf->global->LDAP_FIELD_TOWN] = $this->ville;
if ($this->cp && $conf->global->LDAP_FIELD_ZIP) $info[$conf->global->LDAP_FIELD_ZIP] = $this->zip;
if ($this->ville && $conf->global->LDAP_FIELD_TOWN) $info[$conf->global->LDAP_FIELD_TOWN] = $this->town;
if ($this->office_phone && $conf->global->LDAP_FIELD_PHONE) $info[$conf->global->LDAP_FIELD_PHONE] = $this->office_phone;
if ($this->user_mobile && $conf->global->LDAP_FIELD_MOBILE) $info[$conf->global->LDAP_FIELD_MOBILE] = $this->user_mobile;
if ($this->office_fax && $conf->global->LDAP_FIELD_FAX) $info[$conf->global->LDAP_FIELD_FAX] = $this->office_fax;
Expand Down

0 comments on commit 2713099

Please sign in to comment.