Skip to content

Commit 35b4c58

Browse files
Fix problem with user authentication and only report blank errors for form fields.
1 parent 29b8785 commit 35b4c58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Controller/ProfileController.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function deleteProfileNotLoggedIn(
219219
if ($deleteProfileForm->isSubmitted() && $deleteProfileForm->isValid()) {
220220
$data = $deleteProfileForm->getData();
221221
$memberRepository = $this->entityManager->getRepository(Member::class);
222-
$member = $memberRepository->find($data['username']);
222+
$member = $memberRepository->findOneBy(['username' => $data['username']]);
223223

224224
$verified = false;
225225
if (null === $member) {
@@ -239,7 +239,7 @@ public function deleteProfileNotLoggedIn(
239239
}
240240

241241
if ($success) {
242-
return $this->redirectToRoute('/logout');
242+
return $this->redirectToRoute('security_logout');
243243
}
244244
}
245245

0 commit comments

Comments
 (0)