Loading lib/Controller/AccountController.php +3 −4 Original line number Diff line number Diff line Loading @@ -71,10 +71,9 @@ class AccountController extends Controller { * @NoCSRFRequired * * @param string $lang Language code (default: 'en') * @param string $recoveryEmail recoveryemail (default: '') * */ public function index(string $lang = 'en', string $recoveryEmail = '') { public function index(string $lang = 'en') { if ($this->userSession->isLoggedIn()) { return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl()); } Loading @@ -84,7 +83,7 @@ class AccountController extends Controller { return new TemplateResponse( Application::APP_ID, 'signup', ['appName' => Application::APP_ID, 'lang' => $lang, 'recoveryEmail' => $recoveryEmail], ['appName' => Application::APP_ID, 'lang' => $lang], TemplateResponse::RENDER_AS_GUEST ); } Loading src/Signup.vue +9 −13 Original line number Diff line number Diff line Loading @@ -2,13 +2,6 @@ <div> <section id="main" class="register-page"> <div id="registration"> <p v-if="recoveryEmail"> Recovery Email: {{ recoveryEmail }} </p> <p v-else> No recovery email provided. </p> <RegistrationForm v-if="showRegistrationForm" v-model="formData" @form-submitted="submitRegistrationForm" /> <CaptchaForm v-if="showCaptchaForm" v-model="formData" @form-submitted="submitCaptchaForm" /> <RecoveryEmailForm v-if="showRecoveryEmailForm" v-model="formData" @form-submitted="submitRecoveryEmailForm" /> Loading Loading @@ -37,12 +30,6 @@ export default { RecoveryEmailForm, SuccessSection, }, props: { recoveryEmail: { type: String, default: '', }, }, data() { return { formData: { Loading @@ -62,8 +49,17 @@ export default { showCaptchaForm: false, showRecoveryEmailForm: false, showSuccessSection: false, recoveryEmail: '', } }, mounted() { // Extracting the recovery email from the URL when the component is mounted const urlParams = new URLSearchParams(window.location.search) this.recoveryEmail = urlParams.get('recoveryEmail') // Set formData.email directly to recoveryEmail this.formData.email = this.recoveryEmail }, methods: { submitRegistrationForm(data) { if (data.isFormValid) { Loading src/signup.js +1 −8 Original line number Diff line number Diff line Loading @@ -2,14 +2,7 @@ import Vue from 'vue' import './common.js' import Signup from './Signup.vue' const urlParams = new URLSearchParams(window.location.search) const recoveryEmail = urlParams.get('recoveryEmail') ?? '' export default new Vue({ el: '#ecloud-accounts-signup', render: h => h(Signup, { props: { recoveryEmail, }, }), render: h => h(Signup), }) Loading
lib/Controller/AccountController.php +3 −4 Original line number Diff line number Diff line Loading @@ -71,10 +71,9 @@ class AccountController extends Controller { * @NoCSRFRequired * * @param string $lang Language code (default: 'en') * @param string $recoveryEmail recoveryemail (default: '') * */ public function index(string $lang = 'en', string $recoveryEmail = '') { public function index(string $lang = 'en') { if ($this->userSession->isLoggedIn()) { return new RedirectResponse($this->urlGenerator->linkToDefaultPageUrl()); } Loading @@ -84,7 +83,7 @@ class AccountController extends Controller { return new TemplateResponse( Application::APP_ID, 'signup', ['appName' => Application::APP_ID, 'lang' => $lang, 'recoveryEmail' => $recoveryEmail], ['appName' => Application::APP_ID, 'lang' => $lang], TemplateResponse::RENDER_AS_GUEST ); } Loading
src/Signup.vue +9 −13 Original line number Diff line number Diff line Loading @@ -2,13 +2,6 @@ <div> <section id="main" class="register-page"> <div id="registration"> <p v-if="recoveryEmail"> Recovery Email: {{ recoveryEmail }} </p> <p v-else> No recovery email provided. </p> <RegistrationForm v-if="showRegistrationForm" v-model="formData" @form-submitted="submitRegistrationForm" /> <CaptchaForm v-if="showCaptchaForm" v-model="formData" @form-submitted="submitCaptchaForm" /> <RecoveryEmailForm v-if="showRecoveryEmailForm" v-model="formData" @form-submitted="submitRecoveryEmailForm" /> Loading Loading @@ -37,12 +30,6 @@ export default { RecoveryEmailForm, SuccessSection, }, props: { recoveryEmail: { type: String, default: '', }, }, data() { return { formData: { Loading @@ -62,8 +49,17 @@ export default { showCaptchaForm: false, showRecoveryEmailForm: false, showSuccessSection: false, recoveryEmail: '', } }, mounted() { // Extracting the recovery email from the URL when the component is mounted const urlParams = new URLSearchParams(window.location.search) this.recoveryEmail = urlParams.get('recoveryEmail') // Set formData.email directly to recoveryEmail this.formData.email = this.recoveryEmail }, methods: { submitRegistrationForm(data) { if (data.isFormValid) { Loading
src/signup.js +1 −8 Original line number Diff line number Diff line Loading @@ -2,14 +2,7 @@ import Vue from 'vue' import './common.js' import Signup from './Signup.vue' const urlParams = new URLSearchParams(window.location.search) const recoveryEmail = urlParams.get('recoveryEmail') ?? '' export default new Vue({ el: '#ecloud-accounts-signup', render: h => h(Signup, { props: { recoveryEmail, }, }), render: h => h(Signup), })