From cbaa4d13d172b70da3f61c2c1b20c729040e2152 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 6 Oct 2019 11:57:43 +0200 Subject: [PATCH] add server side check about note to admin --- src/Module/Register.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Module/Register.php b/src/Module/Register.php index 1637e0d8b6..51287053fd 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -259,6 +259,14 @@ class Register extends BaseModule $a->internalRedirect(); } + // Check if the note to the admin is actually filled out + if (empty($_POST['permonlybox'])) { + \notice(L10n::t('You have to leave a request note for the admin.') + . L10n::t('Your registration can not be processed.') . EOL); + + $a->internalRedirect('register/'); + } + Model\Register::createForApproval($user['uid'], Config::get('system', 'language'), $_POST['permonlybox']); // invite system