summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-13 16:30:15 -0700
committerJames Cook <james@lindenlab.com>2010-05-13 16:30:15 -0700
commit894261e4e4aea8a15bef33fdf34807812a1c73bb (patch)
tree862474065b719f2d4d7287733c387bea6952a7b5 /indra/newview/llpanellogin.cpp
parent8b524549902b780c2833691368bc35bdb1837cd9 (diff)
Fix build errors introduced in last merge
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 23d05183b4..d313a95546 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -600,7 +600,8 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
LL_INFOS2("Credentials", "Authentication") << "retrieving username:" << username << LL_ENDL;
// determine if the username is a first/last form or not.
size_t separator_index = username.find_first_of(' ');
- if (separator_index == username.npos)
+ if (separator_index == username.npos
+ && !LLGridManager::getInstance()->isSystemGrid())
{
LL_INFOS2("Credentials", "Authentication") << "account: " << username << LL_ENDL;
// single username, so this is a 'clear' identifier
@@ -618,8 +619,19 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
else
{
std::string first = username.substr(0, separator_index);
- std::string last = username.substr(separator_index, username.npos);
- LLStringUtil::trim(last);
+ std::string last;
+ if (separator_index != username.npos)
+ {
+ last = username.substr(separator_index, username.npos);
+ LLStringUtil::trim(last);
+ }
+ else
+ {
+ // ...on Linden grids, single username users as considered to have
+ // last name "Resident"
+ // *TODO: Make login.cgi support "account_name" like above
+ last = "Resident";
+ }
if (last.find_first_of(' ') == last.npos)
{