Fix| Header title in user card
This commit is contained in:
parent
b184e34611
commit
46eb222407
1 changed files with 14 additions and 7 deletions
|
|
@ -772,7 +772,19 @@ if (isModEnabled('stock')) {
|
|||
$formproduct = new FormProduct($db);
|
||||
}
|
||||
|
||||
if ($object->id > 0) {
|
||||
if (GETPOSTINT('id') > 0) {
|
||||
$res = $object->fetch($id, '', '', 1);
|
||||
if ($res < 0) {
|
||||
dol_print_error($db, $object->error);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($res == 0) {
|
||||
$langs->load("errors");
|
||||
print($langs->trans('ErrorRecordNotFound'));
|
||||
exit;
|
||||
}
|
||||
|
||||
$person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname;
|
||||
$title = $person_name." - ".$langs->trans('Card');
|
||||
} else {
|
||||
|
|
@ -1380,12 +1392,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
print "</form>";
|
||||
} else {
|
||||
// View and edit mode
|
||||
if ($id > 0) {
|
||||
$res = $object->fetch($id, '', '', 1);
|
||||
if ($res < 0) {
|
||||
dol_print_error($db, $object->error);
|
||||
exit;
|
||||
}
|
||||
if ($object->id > 0) {
|
||||
$res = $object->fetch_optionals();
|
||||
|
||||
// Check if user has rights
|
||||
|
|
|
|||
Loading…
Reference in a new issue