Fix GUI AutoLogin

This commit is contained in:
Phenom 2017-07-16 16:01:08 +02:00
parent 2d5e1d637f
commit 59e018e02d

View File

@ -497,24 +497,23 @@ int RsInit::InitRetroShare(int _argc, char **_argv, bool /* strictCheck */)
} }
} }
#ifdef TO_REMOVE #ifdef RS_AUTOLOGIN
/* check that we have selected someone */ /* check that we have selected someone */
RsPeerId preferredId; RsPeerId preferredId;
bool existingUser = rsAccounts->getPreferredAccountId(preferredId); bool existingUser = rsAccounts->getPreferredAccountId(preferredId);
if (existingUser) if (existingUser)
{
if(RsLoginHandler::getSSLPassword(preferredId,false,rsInitConfig->passwd))
{ {
if (rsInitConfig->passwd != "") RsInit::setAutoLogin(true);
std::cerr << "Autologin has succeeded" << std::endl;
if(RsLoginHandler::getSSLPassword(preferredId,false,rsInitConfig->passwd)) return RS_INIT_HAVE_ACCOUNT;
{
RsInit::setAutoLogin(true);
std::cerr << "Autologin has succeeded" << std::endl;
return RS_INIT_HAVE_ACCOUNT;
}
} }
}
#endif #endif
return RS_INIT_OK;
return RS_INIT_OK;
} }