diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index 65f0bc363a9..185696fd160 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -1037,11 +1037,11 @@ else
print '
';
- if ($caneditfield)
+ if ($caneditfield && (($fuser->entity == $conf->entity)||($fuser->id == $user->id)))
{
print '
'.$langs->trans("Modify").'';
}
- elseif ($caneditpassword && ! $fuser->ldap_sid)
+ elseif ($caneditpassword && ! $fuser->ldap_sid && $fuser->entity == $conf->entity)
{
print '
'.$langs->trans("EditPassword").'';
}
@@ -1049,29 +1049,29 @@ else
// Si on a un gestionnaire de generation de mot de passe actif
if ($conf->global->USER_PASSWORD_GENERATED != 'none')
{
- if (($user->id != $_GET["id"] && $caneditpassword) && $fuser->login && !$fuser->ldap_sid)
+ if (($user->id != $_GET["id"] && $caneditpassword) && $fuser->login && !$fuser->ldap_sid && $fuser->entity == $conf->entity)
{
print '
'.$langs->trans("ReinitPassword").'';
}
- if (($user->id != $_GET["id"] && $caneditpassword) && $fuser->email && $fuser->login && !$fuser->ldap_sid)
+ if (($user->id != $_GET["id"] && $caneditpassword) && $fuser->email && $fuser->login && !$fuser->ldap_sid && $fuser->entity == $conf->entity)
{
print '
'.$langs->trans("SendNewPassword").'';
}
}
// Activer
- if ($user->id <> $_GET["id"] && $candisableperms && $fuser->statut == 0)
+ if ($user->id <> $_GET["id"] && $candisableperms && $fuser->statut == 0 && $fuser->entity == $conf->entity)
{
print '
'.$langs->trans("Reactivate").'';
}
// Desactiver
- if ($user->id <> $_GET["id"] && $candisableperms && $fuser->statut == 1)
+ if ($user->id <> $_GET["id"] && $candisableperms && $fuser->statut == 1 && $fuser->entity == $conf->entity)
{
print '
'.$langs->trans("DisableUser").'';
}
-
- if ($user->id <> $_GET["id"] && $candisableperms)
+ // Delete
+ if ($user->id <> $_GET["id"] && $candisableperms && $fuser->entity == $conf->entity)
{
print '
'.$langs->trans("DeleteUser").'';
}