nakama icon indicating copy to clipboard operation
nakama copied to clipboard

[FEATURE] Account deletion hook

Open Rojoss opened this issue 2 years ago • 2 comments

It would be great if a hook for account deletion can be added. This way we can clean up any storage objects that are not directly associated to the account.

We've tried setting up a hook for RegisterAfterDeleteStorageObjects but this is never fired when deleting an account even though the storage objects from the account get deleted. So currently there is no way to run some code when an account is deleted.

Rojoss avatar Apr 11 '22 10:04 Rojoss

@Rojoss What situations do you have where you'd have storage objects owned by a user that are not marked as owned by that user in the storage engine?

novabyte avatar Apr 11 '22 12:04 novabyte

@novabyte For example we store a list of users that assisted you which is stored on an object owned by the user that got assisted. Another example would be for custom logic when an account is deleted, let's say we have a (non realtime) turn based match between 2 players and 1 player deletes his account, then the match needs be be destroyed too and the other player should be notified.

Rojoss avatar Apr 15 '22 10:04 Rojoss