diff --git a/src/User/src/Form/ProfileDeleteForm.php b/src/User/src/Form/ProfileDeleteForm.php index e3625c00..a6dbb0f3 100644 --- a/src/User/src/Form/ProfileDeleteForm.php +++ b/src/User/src/Form/ProfileDeleteForm.php @@ -45,7 +45,7 @@ public function init(): void ], 'options' => [ 'label' => 'I want to delete account', - 'use_hidden_element' => true, + 'use_hidden_element' => false, 'checked_value' => (string) User::IS_DELETED_YES, 'unchecked_value' => (string) User::IS_DELETED_NO, ], diff --git a/src/User/src/InputFilter/ProfileDeleteInputFilter.php b/src/User/src/InputFilter/ProfileDeleteInputFilter.php index b8239dc3..077d0e5e 100644 --- a/src/User/src/InputFilter/ProfileDeleteInputFilter.php +++ b/src/User/src/InputFilter/ProfileDeleteInputFilter.php @@ -31,7 +31,7 @@ public function init(): void ->attachByName(InArray::class, [ 'haystack' => User::IS_DELETED, 'message' => Message::DELETE_ACCOUNT, - 'strict' => InArray::COMPARE_STRICT, + 'strict' => InArray::COMPARE_NOT_STRICT, ], true) ->attachByName(NotEmpty::class, [ 'message' => Message::DELETE_ACCOUNT, diff --git a/src/User/src/Service/UserService.php b/src/User/src/Service/UserService.php index 4d677b15..a0508ea0 100644 --- a/src/User/src/Service/UserService.php +++ b/src/User/src/Service/UserService.php @@ -133,7 +133,7 @@ public function updateUser(User $user, array $data = []): User } if (isset($data['isDeleted'])) { - $user->setIsDeleted($data['isDeleted']); + $user->setIsDeleted((bool) $data['isDeleted']); } if (isset($data['hash'])) {