Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds VALIDATE_USER setting config, if False then don't check email in User model #370

Closed
wants to merge 2 commits into from

Conversation

symbolic09
Copy link

Need this functionality for the applications that don't have a web-based interface for normal users.
if NEWSLETTER_VALIDATE_USER is false in settings.py then it will not check for email in the User model.
fixes #369

symbolic-ac and others added 2 commits April 21, 2021 16:24
Needed for application that don't have website based interface.
Adds logic to bypass validation error for user model user.
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.88%. Comparing base (c350966) to head (b9222ff).
Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
newsletter/settings.py 71.42% 1 Missing and 1 partial ⚠️
newsletter/validators.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
- Coverage   86.02%   85.88%   -0.14%     
==========================================
  Files          16       16              
  Lines        1302     1311       +9     
  Branches      137      139       +2     
==========================================
+ Hits         1120     1126       +6     
- Misses        135      136       +1     
- Partials       47       49       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

"account on this site. Please log in as that user "
"and try again."
) % {'email': email})
if User.objects.filter(email__exact=email).exists():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be email__iexact? Because "[email protected]" and "[email protected]' would be the same user.

@ekerstein
Copy link

ekerstein commented May 21, 2022

Any update on this PR? I would greatly like to use this feature.

My newsletter signup is only public-facing. So I want to require emails to always be inputted and disable the validation to not leak user data per this issue: #183

@newearthmartin
Copy link
Contributor

I need this PR too as I also do not use the django user system.

@symbolic09 symbolic09 closed this by deleting the head repository Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to unsubscribe existing user from email link.
4 participants