diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index 5d4dadca9d..1ea66176ff 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -97,16 +97,16 @@ module.exports = createReactClass({ const haveIs = Boolean(this.props.serverConfig.isUrl); let desc; - if (haveIs) { - desc = _t( - "If you don't specify an email address, you won't be able to reset your password. " + - "Are you sure?", - ); - } else { + if (this.props.serverRequiresIdServer && !haveIs) { desc = _t( "No Identity Server is configured so you cannot add add an email address in order to " + "reset your password in the future.", ); + } else { + desc = _t( + "If you don't specify an email address, you won't be able to reset your password. " + + "Are you sure?", + ); } const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); @@ -439,7 +439,10 @@ module.exports = createReactClass({ _showEmail() { const haveIs = Boolean(this.props.serverConfig.isUrl); - if ((this.props.serverRequiresIdServer && !haveIs) || !this._authStepIsUsed('m.login.email.identity')) { + if ( + (this.props.serverRequiresIdServer && !haveIs) || + !this._authStepIsUsed('m.login.email.identity') + ) { return false; } return true; @@ -448,8 +451,11 @@ module.exports = createReactClass({ _showPhoneNumber() { const threePidLogin = !SdkConfig.get().disable_3pid_login; const haveIs = Boolean(this.props.serverConfig.isUrl); - const haveRequiredIs = this.props.serverRequiresIdServer && !haveIs; - if (!threePidLogin || haveRequiredIs || !this._authStepIsUsed('m.login.msisdn')) { + if ( + !threePidLogin || + (this.props.serverRequiresIdServer && !haveIs) || + !this._authStepIsUsed('m.login.msisdn') + ) { return false; } return true; @@ -592,12 +598,15 @@ module.exports = createReactClass({ } } const haveIs = Boolean(this.props.serverConfig.isUrl); - const noIsText = haveIs ? null :