question

tombatsford avatar image
tombatsford asked

Best practice for resetting a user/player account.

Hey,

We will be going into a testing phase with playfab shortly within the office initially but then on small public tests and i would like to ask what the best practice is for resetting a users account. Currently we initialise a users account information through various cloud script calls when they sign in and the "NewlyCreated" flag is true, however when deleting a users data within playfab it does not cause this flag to be set to true any more so first time log in and initial account set up is not run again. It would be very useful in development to be able to wipe a users data so that the next time they log in the start up scripts are run once more and their account is reset to an initial state. We are however also toying with the idea of allowing players an optional account reset that would revert their data back to its initial state, so I would like to know what the best method for both would be (development and live account reset / wipe).

Thanks!

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

Correct - deleting a user means deleting it from the title not from your Publisher ID space. That's where the "core" of the player account lives, with all linked accounts. That way, the same login methods will get the player to the same PlayFab ID across all your games, it's just that each game has distinct title-level data. However, if you delete a user from a title, you will get the player_added_title event again, the next time they sign into that title, so that's another possible approach.

Ultimately, it depends upon what your goals are for the wipe. If, for example, you're doing an alpha/beta or early access, you could even go so far as to have a separate Title ID that you use for that, and switch to the live one when you launch the final version of the title. You could then use player publisher data to store information about the player's progress from the earlier version, if you want to use that to provide special rewards to players in the final game.

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.