Merge pull request #946 from PhenomRetroShare/Fix_GuiAutoLogin

Fix GUI AutoLogin
This commit is contained in:
csoler 2017-07-26 13:50:21 +02:00 committed by GitHub
commit 1792273cff

View File

@ -499,15 +499,13 @@ 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 (rsInitConfig->passwd != "")
if(RsLoginHandler::getSSLPassword(preferredId,false,rsInitConfig->passwd)) if(RsLoginHandler::getSSLPassword(preferredId,false,rsInitConfig->passwd))
{ {
RsInit::setAutoLogin(true); RsInit::setAutoLogin(true);
@ -516,6 +514,7 @@ int RsInit::InitRetroShare(int _argc, char **_argv, bool /* strictCheck */)
} }
} }
#endif #endif
return RS_INIT_OK; return RS_INIT_OK;
} }