diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/loginhandler.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 88b085aa3..92a2e9f35 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -151,15 +151,23 @@ void LoginHandler::loginOrRegister(LoginData *const data) const else loginAccount(data); - // Clear the password, avoids auto login when returning to login - data->password.clear(); - const bool remember = data->remember; - if (remember) + if (remember) { serverConfig.setValue("username", data->username); - else +#ifdef SAVE_PASSWORD + serverConfig.setValue("password", data->password); +#endif + } + else { serverConfig.setValue("username", ""); +#ifdef SAVE_PASSWORD + serverConfig.setValue("password", ""); +#endif + } serverConfig.setValue("remember", remember); + + // Clear the password, avoids auto login when returning to login + data->password.clear(); } void LoginHandler::logout() const |