MCPcopy Create free account
hub / github.com/chrxh/alien / onNewPassword

Method onNewPassword

source/Gui/NewPasswordDialog.cpp:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void NewPasswordDialog::onNewPassword()
61{
62 auto result = NetworkService::get().setNewPassword(_userName, _newPassword, _confirmationCode);
63 if (result) {
64 LoginErrorCode errorCode;
65 result |= NetworkService::get().login(errorCode, _userName, _newPassword, _userInfo);
66 }
67 if (!result) {
68 GenericMessageDialog::get().information("Error", "An error occurred on the server. Your entered code may be incorrect.\nPlease try to reset the password again.");
69 return;
70 }
71 GenericMessageDialog::get().information("Information", "The password has been successfully set.\nYou are logged in.");
72 BrowserWindow::get().onRefresh();
73}

Callers

nothing calls this directly

Calls 4

setNewPasswordMethod · 0.80
loginMethod · 0.80
informationMethod · 0.80
onRefreshMethod · 0.80

Tested by

no test coverage detected