Revert "refactor: move deSEC password-reveal logic from JS to Twig (PRG pattern)"

This reverts commit 1c6ca098d5.
This commit is contained in:
Simon L.
2026-04-26 18:25:39 +02:00
parent 1c6ca098d5
commit 11d8050085
6 changed files with 25 additions and 50 deletions

View File

@@ -122,7 +122,10 @@ class DesecManager {
if ($code === 400) {
$data = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
if (is_array($data) && isset($data['email'])) {
throw new AlreadyRegisteredException($email);
throw new \Exception(
'This email address is already registered at deSEC. '
. 'If this is your account, please enter your deSEC password in the password field and try again.',
);
}
throw new \Exception('Registration at deSEC failed (HTTP 400): ' . $body);
}