mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX compatibility with externals modules
This commit is contained in:
parent
4934a335b0
commit
41b07d1630
|
|
@ -1980,7 +1980,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
print '</tr>';
|
||||
|
||||
// Date login validity
|
||||
print '<tr class="nooddeven"><td class="titlefieldmax45">'.$langs->trans("RangeOfLoginValidity").'</td>';
|
||||
print '<tr class="nooddeven"><td class="titlefieldmax45 nowraponall">'.$langs->trans("RangeOfLoginValidity").'</td>';
|
||||
print '<td>';
|
||||
if ($object->datestartvalidity) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("FromDate").'</span> ';
|
||||
|
|
@ -2043,9 +2043,9 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
// Other form for user password
|
||||
$parameters = array('valuetoshow' => $valuetoshow, 'caneditpasswordandsee' => $permissiontoeditpasswordandsee, 'caneditpasswordandsend' => $permissiontoeditpasswordandsend);
|
||||
$reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook > 0) {
|
||||
if ($reshook === 1) {
|
||||
$valuetoshow = $hookmanager->resPrint; // to replace
|
||||
} else {
|
||||
} elseif (empty($reshook)) {
|
||||
$valuetoshow .= $hookmanager->resPrint; // to add
|
||||
}
|
||||
|
||||
|
|
@ -2057,6 +2057,11 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
// for compatibility with externals modules
|
||||
if ($reshook > 1) {
|
||||
print $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// API key
|
||||
if (isModEnabled('api') && ($user->id == $id || $user->admin || $user->hasRight("api", "apikey", "generate"))) {
|
||||
print '<tr class="nooddeven"><td>'.$langs->trans("ApiKey").'</td>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user