Пример #1
0
ELoginStatus::Type FOnlineIdentityNull::GetLoginStatus(const FUniqueNetId& UserId) const 
{
	TSharedPtr<FUserOnlineAccount> UserAccount = GetUserAccount(UserId);
	if (UserAccount.IsValid() &&
		UserAccount->GetUserId()->IsValid())
	{
		return ELoginStatus::LoggedIn;
	}
	return ELoginStatus::NotLoggedIn;
}
ELoginStatus::Type FOnlineIdentityFacebook::GetLoginStatus(const FUniqueNetId& UserId) const
{
	TSharedPtr<FUserOnlineAccount> UserAccount = GetUserAccount(UserId);
	if (UserAccount.IsValid() &&
		UserAccount->GetUserId()->IsValid() &&
		!UserAccount->GetAccessToken().IsEmpty())
	{
		return ELoginStatus::LoggedIn;
	}
	return ELoginStatus::NotLoggedIn;
}
FString FOnlineIdentityAmazon::GetAuthToken(int32 LocalUserNum) const
{
	TSharedPtr<const FUniqueNetId> UserId = GetUniquePlayerId(LocalUserNum);
	if (UserId.IsValid())
	{
		TSharedPtr<FUserOnlineAccount> UserAccount = GetUserAccount(*UserId);
		if (UserAccount.IsValid())
		{
			return UserAccount->GetAccessToken();
		}
	}
	return FString();
}
Пример #4
0
CString
LogAnalysis::CreateUserLogfile(CString p_filename)
{
  CString extensie;
  CString filepart;
  int pos = p_filename.ReverseFind('.');
  if(pos >= 0)
  {
    filepart = p_filename.Left(pos);
    extensie = p_filename.Mid(pos);
  }
  else
  {
    // No extension found
    filepart = p_filename;
  }
  CString user(GetUserAccount(NameUnknown,true));
  filepart += "_";
  filepart += user;
  filepart += extensie;

  return filepart;
}