Is session data deleted when a user is deleted?

0 votes
When a user is manually deleted from the dashboard, does it also delete the session data that goes with it? It seems like it might not because when I deleted a user from the dashboard and then created a new user with the same name the same session data was still there. If I delete a user it should also delete the associated session data.
asked Jun 22, 2016 in Corona by brian (15 points)

1 Answer

0 votes
Hi Brian,

Could you please share the deatils about the data which is not getting deleted? Are saving these data for user, if yes, could you please provide the code snippet used for the same.

It will help us to provide better support to you.

Regards,

Rajeev
answered Jun 23, 2016 by rajeev.etc (1,660 points)
So let's say I have an active user named "Bob".  Bob has some session data associated with his account.  Then let's say for whatever reason I need to delete Bob's account by going into the dashboard, clicking on Bob and choosing "Delete Permanently".   Bob then goes and signs up again using the exact same username and email address.  Bob's original session data is still there and wasn't cleared out when his account was deleted.  And since session data is not visible from the dashboard, I can't delete it manually.

I worked around the issue by checking to see if there is an active session when the new account is created.  If a session exists, I immediately invalidate it.

However, the same issue exists for game leaderboard.  If a user account is deleted and a new account is created using the same userid and password/email, when I perform a "Get Latest Scores By User" (prior to the new user saving any scores) it will return the latest score created under the deleted user account.  And in this case I have no way to delete previous scores by user name.

Again, I found a workaround by setting a score of zero when the user account is created just to make sure the latest score is always zero to start.
Brian
Hi Brian,

Apologies for late reply.

Regarding your queries, the different modules available in App42 Cloud APIs are loosely coupled. So, the activity performed with one module does not affect the other.

So, the work-around which you have done is one way to achieve your requirement. However, i will discuss the same with our production team.

Regards,
Rajeev
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...