]> git.mxchange.org Git - friendica.git/commitdiff
add server side check about note to admin
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 6 Oct 2019 09:57:43 +0000 (11:57 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 6 Oct 2019 09:57:43 +0000 (11:57 +0200)
src/Module/Register.php

index 1637e0d8b6aa2997ea210811be90afa4cff08d04..51287053fdb46519ed4fdd8ade621be10de0ea07 100644 (file)
@@ -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