RetroAchievements - Fix Aliases

It turns out that it is possible to create a login alias in RetroAchievements
such that you can log in with a username that doesn't match your display name.
AchievementManager was treating this as a synchronization error, but this is
desired behavior, so this removes the check.
This commit is contained in:
Lilly Jade Katrin
2026-01-30 18:48:56 -05:00
parent bb7e011673
commit 18f8ed6588
+1 -15
View File
@@ -931,23 +931,9 @@ void AchievementManager::LoginCallback(int result, const char* error_message, rc
std::string config_username = Config::Get(Config::RA_USERNAME); std::string config_username = Config::Get(Config::RA_USERNAME);
if (config_username != user->username) if (config_username != user->username)
{ {
if (Common::CaseInsensitiveEquals(config_username, user->username)) INFO_LOG_FMT(ACHIEVEMENTS, "Username alias {} -> {}.", config_username, user->username);
{
INFO_LOG_FMT(ACHIEVEMENTS,
"Case mismatch between site {} and local {}; updating local config.",
user->username, Config::Get(Config::RA_USERNAME));
Config::SetBaseOrCurrent(Config::RA_USERNAME, user->username); Config::SetBaseOrCurrent(Config::RA_USERNAME, user->username);
} }
else
{
INFO_LOG_FMT(ACHIEVEMENTS, "Attempted to login prior user {}; current user is {}.",
user->username, Config::Get(Config::RA_USERNAME));
rc_client_logout(client);
instance.update_event.Trigger({.failed_login_code = RC_INVALID_STATE});
instance.login_event.Trigger(RC_INVALID_STATE);
return;
}
}
instance.login_event.Trigger(RC_OK); instance.login_event.Trigger(RC_OK);
INFO_LOG_FMT(ACHIEVEMENTS, "Successfully logged in {} to RetroAchievements server.", INFO_LOG_FMT(ACHIEVEMENTS, "Successfully logged in {} to RetroAchievements server.",