Fix remove_expired_registration_profiles() cron job to avoid data loss.

RESOLVED FIXED in 2013Q4

Status

P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rrosario, Assigned: rrosario)

Tracking

unspecified
2013Q4

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=user c=users p=1 s=2013.22)

(Assignee)

Description

5 years ago
We have a cron job that deletes all the expired (30 days) registration profiles (remove_expired_registration_profiles). It also deletes the user if the user isn't active at the time.

The problem is that the user might have activated their account but then deactivated by a moderator or admin. In this case, deleting the user will delete all of the users data too.

We should fix this cron job so that it truly only deletes users that never activated their account.

I'm not sure what the solution is but it's probably about 2pts.
(Assignee)

Updated

5 years ago
Assignee: nobody → rrosario
(Assignee)

Comment 1

5 years ago
Adjusting to 1pt. I fixed it by deleting RegistrationProfile as soon as we activate the user. This way, when the expired profiles are deleted after 30 days, they will only be for users that never activated their account. The only possible data they can have is a question that never got "activated" so it's ok to delete it.
Whiteboard: u=user c=users p=2 s=2013.22 → u=user c=users p=1 s=2013.22
(Assignee)

Comment 4

5 years ago
Deployed to prod now!
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.