question

gdbros avatar image
gdbros asked

How to delete players whose emails are not verified and their accounts 1 month old?

Hello community,

Im developing a Multiplayer game on Unity and using Playfab.

I just wanted to know that how can I use cloudscipt to delete accounts who are 1 month old as well as their profiles are unverified. I have to use a and statement, but I'm not sure how to do so.

Also I would have liked to send another email asking to verify the account if their account is unverified and 3 weeks old, you know, a reminder that it will be deleted if not verified.

So how to go by this? Any ideas or code?

Account ManagementCloudScriptgame manager
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

·
Citrus Yan avatar image
Citrus Yan answered

In your case, I think Player Segmentation would fulfill your requirements, please navigate to the link learn some basic concepts.

After you’ve done that, below are several steps demonstrating the basic idea:

  • For players whose emails are verified, use the AddPlayerTag API to tag them as “Verified”.
  • Create a Segment, let’s call it “ThreeWeeksOldAndUnverified”, the main purpose of this segment is to send reminder emails to players whose accounts are 3 weeks old and unverified, here is the configuration:

/********Config begin*********/

Player

First login is greater than or equal to 30240 minutes (3 weeks)

AND

First login is less than or equal to 43200 minutes (about 1 Month)

AND

Tag is not title.your_title_id.Verified

Actions

Entered segment: Send email to remind the players to verify their emails

/********Config end********/

If the player successfully verified their emails, tag them as “Verified” from your website’s back-end server.

  • Create another Segment, let’s call it “OneMonthOldAndUnverified”, the purpose of this segment is to delete 1 Month old and Unverified accounts, here is the configurations:

/********Config begin*********/

Player

First login is greater than 43200 minutes (about 1 Month)

AND

Tag is not title.your_title_id.Verified

Actions

Entered segment: Execute Cloud Script to delete that player’s account from the current title.

/********Config end********/

Above is just the basic idea which does not get down to the nitty-gritty of the problem, if you have any further questions concerning more details, feel free to discuss with us.

1 comment
10 |1200

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

gdbros avatar image gdbros commented ·

Thanks for the answer, I have some questions regarding the AddPlayerTag but will ask after trying to apply it.

0 Likes 0 ·

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.