add server side check about note to admin

Este commit está contenido en:
Tobias Diekershoff 2019-10-06 11:57:43 +02:00
padre 8f60536634
commit cbaa4d13d1
Se han modificado 1 ficheros con 8 adiciones y 0 borrados

Ver fichero

@ -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