Commit 1c7713d8 by Damien Moulard

prevent encaissement if adherent account is disabled

parent ed2b0107
......@@ -267,6 +267,16 @@ class UserController extends AbstractController
$adherent = $data["adherent"];
$adherent_code = $adherent->getPaymentCode();
// if adherent account isn't enabled
if (!$adherent->getUser()->isEnabled()) {
$this->addFlash(
'error',
$this->translator->trans('Le compte de l\'habitant·e est désactivé.')
);
goto end;
}
// if adherent doesn't have a validation code
if (is_null($adherent_code)) {
$this->addFlash(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment