mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Merge pull request #512 from matrix-org/dbkr/fix_registration_retry
Fix registration retry
This commit is contained in:
commit
515f10bd8b
1 changed files with 7 additions and 0 deletions
|
@ -51,6 +51,9 @@ class Signup {
|
|||
|
||||
/**
|
||||
* Registration logic class
|
||||
* This exists for the lifetime of a user's attempt to register an account,
|
||||
* so if their registration attempt fails for whatever reason and they
|
||||
* try again, call register() on the same instance again.
|
||||
*/
|
||||
class Register extends Signup {
|
||||
constructor(hsUrl, isUrl, opts) {
|
||||
|
@ -117,12 +120,16 @@ class Register extends Signup {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the registration process from the first stage
|
||||
*/
|
||||
register(formVals) {
|
||||
var {username, password, email} = formVals;
|
||||
this.email = email;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
const client = this._createTemporaryClient();
|
||||
this.activeStage = null;
|
||||
return this._tryRegister(client);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue