- if (this.stage != "Update")
- {
- this.nameOrEmail = "";
- this.user["email"] = "";
- // Update global object
- this.user["name"] = res.name;
- this.user["id"] = res.id;
- // Store our identifiers in local storage (by little anticipation...)
- localStorage["myid"] = res.id;
- localStorage["myname"] = res.name;
- }
- setTimeout(() => {
- this.infoMsg = "";
- if (this.stage == "Register")
- this.stage = "Login";
- document.getElementById("modalUser").checked = false;
- }, 2000);