Merge pull request #7706 from tobiasd/20191006-checknote

add server side check about note to admin
Этот коммит содержится в:
Hypolite Petovan 2019-10-06 07:53:09 -04:00 коммит произвёл GitHub
родитель 69ea65c0f2 cbaa4d13d1
Коммит 7959b9bbed
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

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