Commit c177c4da authored by Michal Čihař's avatar Michal Čihař

Do not try to create verified mail for empty mail

Issue #1086
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a72297f5
......@@ -849,7 +849,7 @@ def post_login_handler(sender, request, user, **kwargs):
profile = Profile.objects.get_or_create(user=user)[0]
# Migrate django-registration based verification to python-social-auth
if (user.has_usable_password() and
if (user.has_usable_password() and user.email and
not user.social_auth.filter(provider='email').exists()):
social = user.social_auth.create(
provider='email',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment