From f575c503f10f0e56d1a1f38b78e357a16f736f0f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Sep 2020 15:21:59 +0200 Subject: [PATCH] Fix css --- htdocs/user/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8142ab323a1..60d898a064d 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2018 Regis Houssin * Copyright (C) 2005 Lionel Cousteix @@ -1434,7 +1434,7 @@ if ($action == 'create' || $action == 'adduserldap') { if ($object->pass) $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').preg_replace('/./i', '*', $object->pass); else { - if ($user->admin) $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("Crypted").': '.$object->pass_indatabase_crypted; + if ($user->admin && $user->id == $object->id) $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("Crypted").': '.$object->pass_indatabase_crypted; else $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').''.$langs->trans("Hidden").''; } } @@ -1453,7 +1453,7 @@ if ($action == 'create' || $action == 'adduserldap') if (!empty($conf->api->enabled) && $user->admin) { print ''.$langs->trans("ApiKey").''; print ''; - if (!empty($object->api_key)) print preg_replace('/./', '*', $object->api_key); + if (!empty($object->api_key)) print ''.preg_replace('/./', '*', $object->api_key).''; print ''; }