Skip to content

Commit

Permalink
middleware fixes for email case
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Percival authored and dbca-asi committed Jan 13, 2017
1 parent c732844 commit e0a8ca2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ledger/accounts/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def user_by_email(backend, details, *args, **kwargs):
request_data = backend.strategy.request_data()
if request_data.get('verification_code') and details.get('email'):
try:
user = EmailIdentity.objects.get(email=details['email']).user
user = EmailIdentity.objects.get(email__iexact=details['email']).user
except EmailIdentity.DoesNotExist:
user = None
return {'user': user}
4 changes: 1 addition & 3 deletions ledger/settings_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'dpaw_utils.middleware.SSOLoginMiddleware',
'dpaw_utils.middleware.AuditMiddleware', # Sets model creator/modifier field values.
# FIXME: find out why django 1.10 breaks
# 'ledger.middleware.FirstTimeNagScreenMiddleware',
'oscar.apps.basket.middleware.BasketMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
]
Expand Down Expand Up @@ -101,7 +99,7 @@
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details'
#'social_core.pipeline.user.user_details'
)

SESSION_COOKIE_DOMAIN = env('SESSION_COOKIE_DOMAIN', None)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Django<1.11.0
git+https://github.com/parksandwildlife/dpaw-utils.git@0.3a13#egg=dpaw-utils
git+https://github.com/parksandwildlife/dpaw-utils.git@0.3a14#egg=dpaw-utils
git+https://github.com/django-oscar/django-oscar.git@feature/django-110#egg=django-oscar
social-auth-app-django==0.1.0
coverage==4.3.1
Expand Down

0 comments on commit e0a8ca2

Please sign in to comment.