diff --git a/js/forum/src/components/SignUpModal.js b/js/forum/src/components/SignUpModal.js index efd46bccf..a3eac5771 100644 --- a/js/forum/src/components/SignUpModal.js +++ b/js/forum/src/components/SignUpModal.js @@ -39,13 +39,6 @@ export default class SignUpModal extends Modal { * @type {Function} */ this.password = m.prop(this.props.password || ''); - - /** - * The user that has been signed up and that should be welcomed. - * - * @type {null|User} - */ - this.welcomeUser = null; } className() { @@ -68,7 +61,7 @@ export default class SignUpModal extends Modal { } body() { - const body = [ + return [ this.props.token ? '' : ,
@@ -105,36 +98,6 @@ export default class SignUpModal extends Modal {
]; - - if (this.welcomeUser) { - const user = this.welcomeUser; - - const fadeIn = (element, isInitialized) => { - if (isInitialized) return; - $(element).hide().fadeIn(); - }; - - body.push( -
-
-
- {avatar(user)} -

{app.translator.trans('core.forum.sign_up.welcome_text', {user})}

- -

{app.translator.trans('core.forum.sign_up.confirmation_message', {email: {user.email()}})}

- -

- -

-
-
-
- ); - } - - return body; } footer() { @@ -181,19 +144,7 @@ export default class SignUpModal extends Modal { data, errorHandler: this.onerror.bind(this) }).then( - payload => { - const user = app.store.pushPayload(payload); - - // If the user's new account has been activated, then we can assume - // that they have been logged in too. Thus, we will reload the page. - // Otherwise, we will show a message asking them to check their email. - if (user.isActivated()) { - window.location.reload(); - } else { - this.welcomeUser = user; - this.loaded(); - } - }, + () => window.location.reload(), this.loaded.bind(this) ); }