diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index a869097f629..5bf47eb19e0 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -824,7 +824,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
}
}
print '';
-
+
if(! empty($conf->api->enabled)) {
// API key
$generated_api_key = '';
@@ -1271,7 +1271,7 @@ else
print "";
}
print ''."\n";
-
+
// API key
if(! empty($conf->api->enabled) && $user->admin) {
print '
| '.$langs->trans("ApiKey").' | ';
@@ -1280,7 +1280,7 @@ else
print $langs->trans("Hidden");
print '';
}
-
+
// Administrator
print ' |
| '.$langs->trans("Administrator").' | ';
if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity)
@@ -1303,7 +1303,8 @@ else
print $form->textwithpicto($text, $langs->trans("InternalExternalDesc"));
print ' | ';
$type=$langs->trans("Internal");
- if ($object->societe_id) $type=$langs->trans("External");
+ if ($object->societe_id > 0) $type=$langs->trans("External");
+ print $type;
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
print ' |
'."\n";
@@ -1850,7 +1851,7 @@ else
}
print $text;
print "\n";
-
+
// API key
if(! empty($conf->api->enabled) && $user->admin) {
print '| '.$langs->trans("ApiKey").' | ';
diff --git a/htdocs/user/index.php b/htdocs/user/index.php
index ed413dd571f..cb2e5617f08 100644
--- a/htdocs/user/index.php
+++ b/htdocs/user/index.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2011 Laurent Destailleur
+ * Copyright (C) 2004-2015 Laurent Destailleur
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2015 Alexandre Spangaro
*
@@ -168,7 +168,7 @@ if ($result)
$obj = $db->fetch_object($result);
$var=!$var;
- $userstatic->id=$obj->id;
+ $userstatic->id=$obj->rowid;
$userstatic->ref=$obj->label;
$userstatic->login=$obj->login;
$userstatic->statut=$obj->statut;