diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 192ff3b1191..48dc1049706 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -818,10 +818,17 @@ if ($action == 'create' || $action == 'adduserldap') $valuetoshow.= ($valuetoshow?', ':'').''; } } + + // Other form for user password + $parameters=array('valuetoshow' => $valuetoshow, 'password' => $password); + $reshook=$hookmanager->executeHooks('printUserPasswordField',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) $valuetoshow=$hookmanager->resPrint; // to replace + else $valuetoshow.=$hookmanager->resPrint; // to add + print $valuetoshow; print ''; - if(! empty($conf->api->enabled)) + if (! empty($conf->api->enabled)) { // API key $generated_api_key = ''; @@ -1363,6 +1370,13 @@ else else $valuetoshow.= ($valuetoshow?(' '.$langs->trans("or").' '):'').$langs->trans("Hidden"); } } + + // Other form for user password + $parameters=array('valuetoshow' => $valuetoshow); + $reshook=$hookmanager->executeHooks('printUserPasswordField',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) $valuetoshow=$hookmanager->resPrint; // to replace + else $valuetoshow.=$hookmanager->resPrint; // to add + print $valuetoshow; print ""; print ''."\n"; @@ -1923,6 +1937,13 @@ else $valuetoshow.=($valuetoshow?(' '.$langs->trans("or").' '):'').preg_replace('/./i','*',$object->pass); } } + + // Other form for user password + $parameters=array('valuetoshow' => $valuetoshow, 'caneditpassword' => $caneditpassword); + $reshook=$hookmanager->executeHooks('printUserPasswordField',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if ($reshook > 0) $valuetoshow=$hookmanager->resPrint; // to replace + else $valuetoshow.=$hookmanager->resPrint; // to add + print $valuetoshow; print "\n"; @@ -2033,7 +2054,7 @@ else else { $type=0; - if ($object->contact_id) $type=$object->contact_id; + if ($object->contactid) $type=$object->contactid; print $form->selectcontacts(0,$type,'contactid',2,'','',1,'',false,1); if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; } @@ -2203,12 +2224,12 @@ else print ''; if ($caneditfield) { - print ''; + print ''; } else { - print ''; - print $object->accountancy_code; + print ''; + print $object->accountancy_code; } print ''; print "";