From 4bbd507e7abc7bf7bae1f15d25387bdc5ba55e31 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 22 Apr 2020 11:33:45 +0100 Subject: [PATCH] If user cannot set email during registration don't tell them to Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/auth/RegistrationForm.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index a89f8c6298..f1624bc9e5 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -102,11 +102,15 @@ export default createReactClass({ "No identity server is configured so you cannot add an email address in order to " + "reset your password in the future.", ); - } else { + } else if (this._showEmail()) { desc = _t( "If you don't specify an email address, you won't be able to reset your password. " + "Are you sure?", ); + } else { + // user can't set an e-mail so don't prompt them to + self._doSubmit(ev); + return; } const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");