question

kevin-4 avatar image
kevin-4 asked

How to get BannedUntil time for a banned player?

Say I'm trying to authenticate a user with PlayFabClientAPI.LoginWithCustomID. If the user identified in the request is banned, the call fails and the error code is "AccountBanned". But it seems like the only way to get the banned until time is to have the result payload (resultPayload.PlayerProfile.BannedUntil) which only becomes available if the request was a success and the user was successfully authenticated and logged in. Is there something I'm missing to be able to grab the result payload?

Similarly with the PlayFab ID. If the call was a success, we have it available to us. If the call failed, it doesn't seem like PlayFabError holds the PlayFab ID (I want to display this to the user so they can contact support if they think the ban was in error). Is there any way to retrieve this if the user is banned?

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

·
brendan avatar image
brendan answered

For the second question, if a login fails, there are a lot of cases where we won't have a PlayFab ID. But in the case of a banned account, I could see having that info, yes. Currently, that is not returned, as you've noted. What I would suggest is adding this as a suggestion in our Feature Requests forum, so that others can "like" the idea, which helps with prioritization.

4 comments
10 |1200

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

kevin-4 avatar image kevin-4 commented ·

Will do. As for the first question, is it not possible to retrieve the BannedUntil time without the payload?

0 Likes 0 ·
brendan avatar image brendan kevin-4 commented ·

Correct - that's what I meant concerning the fact that you already highlighted that you don't get that info. If the player account isn't logged in, which it isn't if it's banned, it cannot retrieve the profile info.

0 Likes 0 ·
kevin-4 avatar image kevin-4 brendan commented ·

The beginning of the reply made it seem that was only regarding the 2nd question (obtaining PlayFabID).

So now I need to ask, what is PlayFab's recommended flow for a player being banned? It couldn't just be "Show a generic message saying that they're banned" - no reason, no time until lifting of the ban, no player ID so that they can contact support about the issue - could it?

0 Likes 0 ·
Show more comments

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.