From a41d414625b07c3aff9bdd7be487c5b908d6a49f Mon Sep 17 00:00:00 2001
From: James Cook <james@lindenlab.com>
Date: Wed, 26 May 2010 16:45:54 -0700
Subject: [PATCH] DEV-50013 Viewer only reads "username" from People API never
 "sl_id"

---
 indra/llcommon/llavatarname.cpp | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index 13b6ad705bf..6e0582f865f 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -40,7 +40,6 @@
 
 // Store these in pre-built std::strings to avoid memory allocations in
 // LLSD map lookups
-static const std::string SL_ID("sl_id");
 static const std::string USERNAME("username");
 static const std::string DISPLAY_NAME("display_name");
 static const std::string LEGACY_FIRST_NAME("legacy_first_name");
@@ -80,17 +79,7 @@ LLSD LLAvatarName::asLLSD() const
 
 void LLAvatarName::fromLLSD(const LLSD& sd)
 {
-	// *HACK: accept both wire formats for now, as we are transitioning
-	// People API to use "username"
-	if (sd.has(USERNAME))
-	{
-		mUsername = sd[USERNAME].asString();
-	}
-	else
-	{
-		// *TODO: Remove
-		mUsername = sd[SL_ID].asString();
-	}
+	mUsername = sd[USERNAME].asString();
 	mDisplayName = sd[DISPLAY_NAME].asString();
 	mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString();
 	mLegacyLastName = sd[LEGACY_LAST_NAME].asString();
-- 
GitLab