diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php
index c9c12731818..fc94ae19bdd 100644
--- a/htdocs/contact.class.php
+++ b/htdocs/contact.class.php
@@ -440,9 +440,11 @@ class Contact
$sql.= " c.address, c.cp, c.ville,";
$sql.= " c.fk_pays, p.libelle as pays, p.code as pays_code,";
$sql.= " c.birthday as birthday, c.poste,";
- $sql.= " c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.note";
+ $sql.= " c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.note,";
+ $sql.= " u.rowid as user_id, u.login as user_login";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON c.fk_pays = p.rowid";
+ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON c.idp = u.fk_socpeople";
$sql.= " WHERE c.idp = ". $id;
$resql=$this->db->query($sql);
@@ -485,7 +487,9 @@ class Contact
$this->birthday = $obj->birthday;
$this->birthday_alert = $obj->birthday_alert;
$this->note = $obj->note;
-
+
+ $this->user_id = $obj->user_id;
+ $this->user_login = $obj->user_login;
}
$this->db->free($resql);
diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php
index 6d8c8606cca..ad2a922cc7d 100644
--- a/htdocs/contact/fiche.php
+++ b/htdocs/contact/fiche.php
@@ -290,9 +290,9 @@ if ($_GET["action"] == 'create')
elseif ($_GET["action"] == 'edit')
{
/*
- * Fiche en mode edition
- *
- */
+ * Fiche en mode edition
+ *
+ */
print '
";
}
else
{
/*
- * Visualisation de la fiche
+ * Fiche en mode visualisation
*
*/
@@ -370,7 +375,7 @@ else
{
$objsoc = new Societe($db);
$objsoc->fetch($contact->socid);
-
+
print '| '.$langs->trans("Company").' | '.$objsoc->nom_url.' |
';
}
else
@@ -399,7 +404,7 @@ else
print '| '.$langs->trans("Country").' | ';
print $contact->pays;
print ' |
';
-
+
print '| Tel Pro | '.$contact->phone_pro.' | ';
print 'Tel Perso | '.$contact->phone_perso.' |
';
@@ -427,6 +432,11 @@ else
print yn($contact->facturation);
print '';
+ print '| '.$langs->trans("DolibarrLogin").' | ';
+ if ($contact->user_id) print ''.$contact->user_login.'';
+ else print $langs->trans("NoDolibarrAccess");
+ print ' |
';
+
print "";
print "";
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 6d027f0f3d1..a6e011d1f2f 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -111,4 +111,6 @@ NoRIB=No RIB defined
NoParentCompany=None
ExportImport=Import-Export
ExportCardToFormat=Export card to format
-ContactNotLinkedToCompany=Contact not linked to any company
\ No newline at end of file
+ContactNotLinkedToCompany=Contact not linked to any company
+DolibarrLogin=Dolibarr login
+NoDolibarrAccess=No Dolibarr access
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang
index c1f11f28a08..0b0259f624c 100644
--- a/htdocs/langs/fr_FR/companies.lang
+++ b/htdocs/langs/fr_FR/companies.lang
@@ -111,4 +111,6 @@ NoRIB=Aucun RIB d
NoParentCompany=Aucune
ExportImport=Import-Export
ExportCardToFormat=Exporter fiche au format
-ContactNotLinkedToCompany=Contact non lié à une société
\ No newline at end of file
+ContactNotLinkedToCompany=Contact non lié à une société
+DolibarrLogin=Login Dolibarr
+NoDolibarrAccess=Pas d'accès Dolibarr
\ No newline at end of file