question

luizcarlos-bs avatar image
luizcarlos-bs asked

How can I get Email from user? I'm using GetAccountInfo, but I can't see the Email

I'm using GetAccountInfo to Get Email, but heres is the code and the problem:

var requestEmail = new GetAccountInfoRequest();
PlayFabClientAPI.GetAccountInfo(requestEmail, OnGetAccountInfoEmailSuccess, OnGetFailure);

That's how I ask for Account Email:

public void OnGetAccountInfoEmailSuccess(GetAccountInfoResult result){

	Debug.Log(result.PrivateAccountInfo.Email);

}


The problem:

Doesn't matter what I put in Debug.Log bettween result. and .Email, I have CS1061 error saying GetAccountInfoResult does not contain a definition for 'Whatever I use'

I tried

Debug.Log(result.AccountInfo.Email);

Debug.Log(result.Email);

Debug.Log(result.PrivateInfo.Email);

Debug.Log(result.UserAccountInfo.Email);

Debug.Log(result.PrivateAccountInfo.Email);
apisPlayer DataAccount Management
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

If you want to use GetAccountInfo API to get player login email, you can try this code: result.AccountInfo.PrivateInfo.Email.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]