diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-12-22 14:20:25 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-12-22 14:20:25 +0200 |
commit | 6ea525f6af15d83f32a3241cfa867b09ff3bdc2c (patch) | |
tree | 28dfb4dd234096c7d6aa041b05f6ac6a69b81758 | |
parent | d3ef8e02a9e6e5cb394a07e294a07aab051a060f (diff) |
MAINT-8120 Account that contains last name Resident cannot see his Favorites on Login Screen
-rw-r--r-- | indra/newview/llpanellogin.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index fc8914c4f9..c876c1c149 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -299,12 +299,24 @@ void LLPanelLogin::addFavoritesToStartLocation() // Load favorites into the combo. std::string user_defined_name = getChild<LLComboBox>("username_combo")->getSimple(); + LLStringUtil::toLower(user_defined_name); std::replace(user_defined_name.begin(), user_defined_name.end(), '.', ' '); std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites_" + LLGridManager::getInstance()->getGrid() + ".xml"); std::string old_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "stored_favorites.xml"); mUsernameLength = user_defined_name.length(); updateLoginButtons(); + std::string::size_type index = user_defined_name.find(' '); + if (index != std::string::npos) + { + std::string username = user_defined_name.substr(0, index); + std::string lastname = user_defined_name.substr(index+1); + if (lastname == "resident") + { + user_defined_name = username; + } + } + LLSD fav_llsd; llifstream file; file.open(filename.c_str()); |