Revert "feat: show deSEC password field only after email-already-registered failure, via POST /containers and Twig (no sessions, no query params)"

This reverts commit 44b257a2b5.
This commit is contained in:
Simon L.
2026-04-26 18:37:19 +02:00
parent 44b257a2b5
commit d58a34b605
4 changed files with 12 additions and 69 deletions

View File

@@ -1,17 +0,0 @@
<?php
declare(strict_types=1);
namespace AIO\Desec;
/**
* Thrown when the deSEC API reports that the supplied email address is already
* associated with an existing account (HTTP 400 with an "email" error field).
*/
class AlreadyRegisteredException extends \Exception {
public function __construct(string $email) {
parent::__construct(
'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.',
);
}
}

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);
}