Load mail address to change password in settings

This commit is contained in:
2021-02-17 18:35:28 +01:00
parent 5e76b2b3f6
commit 5dfe327f8c
2 changed files with 18 additions and 2 deletions

View File

@ -62,8 +62,16 @@ ComunicWeb.pages.settings.sections.password = {
tr("Your new password")
);
(async () => {
let user = await userInfo(userID());
newPasswordInput.setUser(user)
try {
let user = await userInfo(userID());
newPasswordInput.setUser(user)
let mail = await SettingsInterface.getMail()
newPasswordInput.setEmail(mail)
} catch(e) {
console.error(e);
notify(tr("Failed to load your information to prepare password update!"), "danger");
}
})();
//Ask the user to confirm its new password