Beispiel #1
0
void LoginForm::newAccountLoginCB(std::pair<gcString, gcString> &info)
{
	ASSERT_UITHREAD();

	gcString username = info.first;
	gcString cookie = info.second;

	if (cookie.empty())
		return;

	if (username.size() == 0 || cookie.size() == 0)
	{
		newAccountLoginError("Invalid data returned from auto login.");
		return;
	}

	if (m_pNewAccount)
		m_pNewAccount->EndModal(0);

	m_tbUsername->SetValue(username);
	m_tbPassword->SetValue(cookie);

	m_tbPasswordDisp->Show(false);
	m_tbPassword->Show();
	Layout();

	doLogin(username, cookie);
}
Beispiel #2
0
void LoginForm::newAccountLogin(const char* username, const char* cookie)
{
	if (!cookie)
		return;

	if (gcString(username).size() == 0 || gcString(cookie).size() == 0)
	{
		newAccountLoginError("Invalid data returned from auto login.");
		return;
	}

	if (m_pNewAccount)
		m_pNewAccount->EndModal(0);

	m_tbUsername->SetValue(username);
	m_tbPassword->SetValue(cookie);

	m_tbPasswordDisp->Show(false);
	m_tbPassword->Show();
	Layout();

	doLogin(username, cookie);
}