X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FRegister.php;h=1aabb843937c83fbaca3bac2bf5a567f29dfc1f5;hb=cdefa7f32a224501a14bcacbe0f0a3792631df93;hp=d02a34a0b5b581b8f334502921f18df6091ed7df;hpb=9a0201e674e7cc091a0bb669377e2b7003479eef;p=friendica.git diff --git a/src/Module/Register.php b/src/Module/Register.php index d02a34a0b5..1aabb84393 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -61,13 +61,6 @@ class Register extends BaseModule } } - if (!empty($_SESSION['theme'])) { - unset($_SESSION['theme']); - } - if (!empty($_SESSION['mobile-theme'])) { - unset($_SESSION['mobile-theme']); - } - $username = defaults($_REQUEST, 'username' , ''); $email = defaults($_REQUEST, 'email' , ''); $openid_url = defaults($_REQUEST, 'openid_url', ''); @@ -114,7 +107,7 @@ class Register extends BaseModule $o = Renderer::replaceMacros($tpl, [ '$invitations' => Config::get('system', 'invitation_only'), '$permonly' => intval(Config::get('config', 'register_policy')) === self::APPROVE, - '$permonlybox' => ['permonlybox', L10n::t('Note for the admin'), '', L10n::t('Leave a message for the admin, why you want to join this node'), "required"], + '$permonlybox' => ['permonlybox', L10n::t('Note for the admin'), '', L10n::t('Leave a message for the admin, why you want to join this node'), 'required'], '$invite_desc' => L10n::t('Membership on this site is by invitation only.'), '$invite_label' => L10n::t('Your invitation code: '), '$invite_id' => $invite_id, @@ -259,6 +252,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