Merge pull request #4461 from matrix-org/t3chguy/register_email_not_possible

If user cannot set email during registration don't tell them to
This commit is contained in:
Michael Telatynski 2020-04-22 13:59:43 +01:00 committed by GitHub
commit ca3ddb3760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 18 deletions

View file

@ -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");