//------------------------------------------------------------------------
bool CPlayerProfileImplConsole::LoginUser(SUserEntry* pEntry)
{
	// lookup stored profiles of the user (pEntry->userId) and fill in the pEntry->profileDesc
	// vector 
	pEntry->profileDesc.clear();

	IPlatformOS *os = gEnv->pSystem->GetPlatformOS();

	unsigned int userIndex;
	bool signedIn = os->UserIsSignedIn(pEntry->userId.c_str(), userIndex);
	CryLogAlways("LoginUser::UserIsSignedIn %d\n", signedIn);

	if (signedIn)
	{
		pEntry->profileDesc.push_back(SLocalProfileInfo(pEntry->userId));

		// Check the profile data exists - if not create it
		string path;
		InternalMakeFSPath(pEntry, pEntry->userId, path);
		IPlatformOS::IFileFinderPtr fileFinder = os->GetFileFinder(userIndex);
		//this assumes there is a profile if a directory exists
		if(!fileFinder->FileExists(path))
		{
			// Create new profile based on the defaults
			CPlayerProfile* profile = m_pMgr->GetDefaultCPlayerProfile();
			string name = profile->GetName();
			profile->SetName(pEntry->userId);
			m_pMgr->LoadGamerProfileDefaults(profile);
#if !CRY_PLATFORM_DURANGO
			// Durango: no reason to overwrite user profile with default profile, mainly for that we're always online.
			SaveProfile(pEntry, profile, pEntry->userId.c_str(), true);
#endif
			profile->SetName(name);
		}
	}
	else
	{
		printf( "OS No User signed in\n" );
	}

	return signedIn;
}