DMOJ / online-judge

A modern open-source online judge and contest platform system.
https://dmoj.ca
GNU Affero General Public License v3.0
952 stars 365 forks source link

Delete unactivated accounts after 7 days #749

Open Xyene opened 6 years ago

Xyene commented 6 years ago

One of the most frequent calls for support is when users create an account, but then forget to activate it. After 7 days, that account becomes unactivateable, forever making that email address unusable. Password resets don't work either.

We should have a cron that clears up these accounts periodically, so at least a user who forgets to activate their account can sign up for another one with the same email/username, instead of involving admins. I'm open to other suggestions, though.

quantum5 commented 6 years ago

I think this is blocked on macropin/django-registration#340.

josedanielr commented 5 years ago

The command delete_unactivated is not for that?

Btw, in Django 1.11 it isn't working, I could fix it if necessary.

Xyene commented 5 years ago

@josedanielr delete_unactivated seems to be something we added a long time ago (and then forgot about). The underlying django-registration has a cleanupregistration command that does exactly this, except when we ran it on dmoj.ca there was a bug (linked above) that wiped a significant portion of our database. It's since been fixed, so you can use that assuming you've updated django-registration.