question

larissa avatar image
larissa asked

UserDisplayName API: Availability-checks and Validation

Hey there! :)

I've recently run into some issues with managing userdisplaynames and wanted to ask for advice:

1.) When a user is changing their displayname, we would like to check the names availability "on the fly" (after the user stopped typing for ~2 seconds or such) rather than waiting for the user to press "submit" first. Unfortunately the only way to "check", is to call UpdateUserTitleDisplayName and see if it returns the NameNotAvailable Errorcode. This method has several flaws (i.e. the old name might get taken away in the meantime, even though we only did a check and the user never submitted the new name).

--> It would be very helpful to have some sort of "CheckUserTitleDisplayNameAvailable" API for this! :)

--> Do you have any suggestions on how to best implement above functionality with the current set of API methods?

2.) We need several forms of validation for Displaynames (like limiting the length, checking it against a blacklist). However UpdateUserTitleDisplayName is not part of the server-api, and it would be a bad idea to trust the client with validation.

(We have somewhat worked our way around this by additionally storing the displayname in userdata and synching it back from there, but we would *really* like to abolish that system, as it's quite ugly and prone to errors.)

--> With the current system, how is one supposed to do any (custom) validation on displaynames? (I'm aware of the addon for profanity-checks, but there are other checks that we need to do)

--> If UpdateUserTitleDisplayName was added to server-api, that'd really save us *a lot* of trouble :)

CloudScript
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

There's a bit of a disconnect between the design of PlayFab and what you have in mind. Simply put, PlayFab is designed as a backend for all games (and actually, non-games as well - we have a few of those), while keeping costs as low as possible so that we can offer extremely low pricing. So a feature that is designed for clients to be hitting it with high frequency isn't something that would work, as it would drive costs up.

For 2, we have a backlog item to add the update display name API call to the Server API. I would recommend adding that as a post in our Feature Requests forum, so that others can "like" it (which helps with prioritization), but I'll also add your name to our internal tracking. Right now, the Community Sift filtering is indeed an option, and you can work with Community Sift to set up custom rules on your names, so that you can blacklist additional terms that aren't in their normal checks.

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.