N°5951 - Fix crash when creating a user with a non valid password

/!\ Mind that this could have impact on DoCheckToWrite() overloads for people using \DBObject::GetKey() instead of \DBObject::IsNew()
This commit is contained in:
Molkobain
2023-02-13 20:22:39 +01:00
parent b97a464bb1
commit 33717b9610
2 changed files with 6 additions and 10 deletions

View File

@@ -278,11 +278,6 @@ JS;
$aResult['data'] = ['error_message' => $e->getHtmlMessage()];
} else {
$sClassLabel = MetaModel::GetName($sClass);
$sClassIcon = MetaModel::GetClassIcon($sClass);
$sHeaderTitle = Dict::Format('UI:CreationTitle_Class', $sClassLabel);
// Important: This is a temporary fix for N°5951, we need to discuss the DBObject::DBInsertNoReload() sequence before going further
$oObj->SetKey(-1);
$oPage->set_title(Dict::Format('UI:CreationPageTitle_Class', $sClassLabel));
if (!empty($aIssues)) {