diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-27 22:58:52 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-27 22:58:52 +0200 |
commit | bc496f5f17a446af27b47cbe227e7e85089bab8d (patch) | |
tree | b7c90fee48d1f48e21c5f62fe84abaca16f8bb81 /indra/newview/llpanellogin.cpp | |
parent | 91c311dd7beb8d723a00efac8e61019eeb8af17b (diff) | |
parent | f89c9e9b20a13acd8f6af76699259cab4c74d5db (diff) |
Downstream merge from lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d7c189271e..4fd39d1211 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -554,12 +554,12 @@ void LLPanelLogin::populateFields(LLPointer<LLCredential> credential, bool remem if (sInstance->mFirstLoginThisInstall) { // no list to populate - setFields(credential, remember_psswrd); + setFields(credential); } else { sInstance->getChild<LLUICtrl>("remember_name")->setValue(remember_user); - sInstance->populateUserList(credential, remember_psswrd); + sInstance->populateUserList(credential); remember_check->setEnabled(remember_user); } } @@ -580,16 +580,13 @@ void LLPanelLogin::resetFields() } else { - LLUICtrl* remember_check = sInstance->getChild<LLUICtrl>("remember_check"); - bool remember_psswrd = remember_check->getValue(); LLPointer<LLCredential> cred = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - sInstance->populateUserList(cred, remember_psswrd); + sInstance->populateUserList(cred); } } // static -void LLPanelLogin::setFields(LLPointer<LLCredential> credential, - bool remember_psswrd) +void LLPanelLogin::setFields(LLPointer<LLCredential> credential) { if (!sInstance) { @@ -631,7 +628,7 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential, LL_INFOS("Credentials") << "Setting authenticator field " << authenticator["type"].asString() << LL_ENDL; if(authenticator.isMap() && authenticator.has("secret") && - (authenticator["secret"].asString().size() > 0) && remember_psswrd) + (authenticator["secret"].asString().size() > 0)) { // This is a MD5 hex digest of a password. @@ -752,7 +749,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential, } else { - remember_user = true; + remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me' } } @@ -1096,8 +1093,7 @@ void LLPanelLogin::onUserListCommit(void*) { std::string user_key = username_combo->getSelectedValue(); LLPointer<LLCredential> cred = gSecAPIHandler->loadFromCredentialMap("login_list", LLGridManager::getInstance()->getGrid(), user_key); - bool remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue(); - setFields(cred, remember_psswrd); + setFields(cred); sInstance->mPasswordModified = false; } else @@ -1156,10 +1152,9 @@ void LLPanelLogin::updateServer() if(!sInstance->areCredentialFieldsDirty()) { // populate dropbox and setFields - bool remember_psswrd = sInstance->getChild<LLUICtrl>("remember_check")->getValue(); // Note: following call is related to initializeLoginInfo() LLPointer<LLCredential> credential = gSecAPIHandler->loadCredential(LLGridManager::getInstance()->getGrid()); - sInstance->populateUserList(credential, remember_psswrd); + sInstance->populateUserList(credential); } // update the login panel links @@ -1198,7 +1193,7 @@ void LLPanelLogin::updateLoginButtons() } } -void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool remember_psswrd) +void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential) { LLComboBox* user_combo = getChild<LLComboBox>("username_combo"); user_combo->removeall(); @@ -1228,15 +1223,19 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential, bool rem } else { - setFields(credential, remember_psswrd); + setFields(credential); } } else { if (credential.notNull()) { - user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); - setFields(credential, remember_psswrd); + const LLSD &ident = credential->getIdentifier(); + if (ident.isMap() && ident.has("type")) + { + user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); + setFields(credential); + } } } } |