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

Open
wants to merge 2 commits into
base: master
Choose a base branch
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

Merging #370 (b9222ff) into master (c350966) will decrease coverage by 0.13%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
newsletter/settings.py 90.00% <71.42%> (-2.46%) ⬇️
newsletter/validators.py 88.88% <80.00%> (-11.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c350966...b9222ff. Read the comment docs.

"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.

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