0

I am looking to implement django-registration for a project but am not sure if it will work out of the box for this use case. I am creating users as soon as I have their e-mail address (whether or not they actually are creating an account). At some time later those same users will try to register for an actual account and set a password, but the activation link will fail if the time ACCOUNT_ACTIVATION_DAYS has expired. Since I have separated the times at which someone actually gets a user versus when they are actually registered, I would ideally like to re-activate the user account.

I have looked through the docs and the source, but don't see any methods to re-activate the account or reset the activation key. Is there any solution to this built in?

Thanks!

  • " I am creating users as soon as they interact with my site". what do you mean by this? In order for a user to be granted an ACCOUNT_ACTIVATION_DAYS, first it must be created and sent it to an email address. If a user hasn't personaly and specificaly requested a sign up process, you don't know to which email to send the activation key which has an expire date. Hence, how can you create an account for an anonymous user who visited your website? – Mihai Zamfir Apr 10 '14 at 00:52
  • I have edited the original post to be a bit more clear. Essentially as soon as I have someone's e-mail address (e.g. from an e-mail sign up) I am creating a user with a random password. Since they aren't actually signing up I don't send out the e-mail at that time. – Scott Greenberg Apr 10 '14 at 03:01
  • why would you do that? why would you want to create the user(moreover, with a random password) in the table before the real sign up process? the thing which you want to do is very unnatural, but if you realy want to do it, it would be better to leave the `django-registration` as it is, and make your own app `django-pre-registration` with a model having the email and random password. Then add a foreign key to the model inside django-registration or to the built in User model – Mihai Zamfir Apr 10 '14 at 07:13

0 Answers0