LeoneBacciu / django-email-verification

A Django app that takes care of verifying a users's email address and activating their profile.
MIT License
353 stars 57 forks source link

Support reactivation for multiple users with the same email address #77

Closed rstorey closed 1 year ago

rstorey commented 1 year ago

These changes add the user ID to the token payload, so that the specific user can be identified for reactivation upon clicking the link. This way, the email address does not have to be unique among all users.

The EMAIL_MULTI_USER setting is removed, since it is no longer necessary to decide whether to allow email address to be non-unique.

LeoneBacciu commented 1 year ago

Hello, thank you for the PR. After consideration I decided that this feature change is not necessary and might instead add unwanted complexity. Because of the nature of this app, it's guaranteed that the user will have an email address, while the presence of the user_id field is not. Moreover the functions return the user object, letting the developer access all of it's field. The addition of EMAIL_MULTI_USER is reserved for a very rare usecase and it's therefore optional. Thank you for your interest. An update is coming soon!