django-lazysignup icon indicating copy to clipboard operation
django-lazysignup copied to clipboard

Email verification support

Open aehlke opened this issue 13 years ago • 3 comments

Hey, I'm using Pinax's account app along with the django-emailconfirmation app to require email verification after signing up before being able to login. This doesn't work with the current lazysignup convert view, since it calls login on the new user immediately after creating it. So I added some kwargs to the view to accomodate email verification and to specify a template to render instead of redirecting if email_verification is on.

I don't expect you to pull this as it is -- I haven't written any tests for this yet, since I'm not sure the way I've done this is how you'd like it (if you even think this update is a good idea in the first place). In particular, I'm not sure how the AJAX requests should be handled in this case -- see the TODO in the commit.

Let me know your thoughts on this and I can try to clean it up some. Thanks!

aehlke avatar Apr 21 '11 06:04 aehlke

Mm - that's really interesting, I like the idea. I'll try to take a more detailed look in the next couple of days. The structure looks OK, I can imagine that this would be useful on a site where membership needs to be approved by an administrator. So initial thoughts (and I'll try and review in more detail over the weekend)

  • Rename references to 'email verification' to something less email-specific
  • As far as the AJAX request goes, sending HTTP 202 (Accepted) is probably the best thing we can do here, together with some simple text in the response body so a human can figure out what's going on. At the risk of getting parameter-itis, the template for this should probably be passed in to the view, like the others are.

But in general, looks really good. If you do get time to add docs and tests, I'd be happy to roll that into a release.

(I've still got better Pinax integration in the back of my mind, but I haven't had to do a Pinax project yet, so I don't know where the pain points are!)

Thanks again for your pull request!

danfairs avatar Apr 21 '11 19:04 danfairs

Hi, shall you merge this pull request? I think email verification is an essential feature. I'm using userena and it forces used to verify their emails. But they can overcome this restriction by registering lazily. So this is security-problem, leading to more spammers.

aladagemre avatar Jul 11 '13 12:07 aladagemre

I haven't had the time to look at this in more detail as I said I would :(

I still like the idea that this feature introduces, and my original comments stand.

danfairs avatar Jul 11 '13 12:07 danfairs