summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-20 15:31:58 -0700
committerJames Cook <james@lindenlab.com>2010-05-20 15:31:58 -0700
commitbe3fb2b578bfc20dda7175cca595a1be53fe23d2 (patch)
tree269dc03dafba3da887038511b2d28bf0c5f9cfec
parentc994a93ed11642fc0fe12c1b743215bf63d852ab (diff)
DEV-50266 Allow login with firstname.lastname
Discussed with Gino
-rw-r--r--indra/newview/llpanellogin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index d313a95546..632c66a68c 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -618,11 +618,14 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
}
else
{
+ // Be lenient in terms of what separators we allow for two-word names
+ // and allow legacy users to login with firstname.lastname
+ separator_index = username.find_first_of(" ._");
std::string first = username.substr(0, separator_index);
std::string last;
if (separator_index != username.npos)
{
- last = username.substr(separator_index, username.npos);
+ last = username.substr(separator_index+1, username.npos);
LLStringUtil::trim(last);
}
else