FIX missing return edit if update error
This commit is contained in:
parent
debcef9b55
commit
05419441aa
@ -303,7 +303,9 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we need to also synchronize user information
|
// Check if we need to also synchronize user information
|
||||||
$nosyncuser = 0;
|
$nosyncuser = 0;
|
||||||
@ -317,6 +319,7 @@ if (empty($reshook)) {
|
|||||||
if ($user->id != $object->user_id && empty($user->rights->user->user->password)) $nosyncuserpass = 1; // Disable synchronizing
|
if ($user->id != $object->user_id && empty($user->rights->user->user->password)) $nosyncuserpass = 1; // Disable synchronizing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
$result = $object->update($user, 0, $nosyncuser, $nosyncuserpass);
|
$result = $object->update($user, 0, $nosyncuser, $nosyncuserpass);
|
||||||
|
|
||||||
if ($result >= 0 && !count($object->errors)) {
|
if ($result >= 0 && !count($object->errors)) {
|
||||||
@ -377,6 +380,9 @@ if (empty($reshook)) {
|
|||||||
} else {
|
} else {
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$action = 'edit';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'add' && $user->rights->adherent->creer) {
|
if ($action == 'add' && $user->rights->adherent->creer) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user