|
|
|
|
@ -7,6 +7,7 @@ from facepy import GraphAPI |
|
|
|
|
from facepy.exceptions import FacepyError |
|
|
|
|
|
|
|
|
|
from django.contrib.auth import get_user_model, logout, login, views |
|
|
|
|
from django.contrib.auth.forms import AuthenticationForm |
|
|
|
|
from django.core.files.base import ContentFile |
|
|
|
|
from django.http import JsonResponse |
|
|
|
|
from django.urls import reverse_lazy |
|
|
|
|
@ -19,7 +20,7 @@ from django.shortcuts import redirect |
|
|
|
|
from apps.notification.utils import send_email |
|
|
|
|
from apps.config.models import Config |
|
|
|
|
|
|
|
|
|
from .forms import LearnerRegistrationForm, AuthenticationForm |
|
|
|
|
from .forms import LearnerRegistrationForm |
|
|
|
|
from .tokens import verification_email_token |
|
|
|
|
|
|
|
|
|
User = get_user_model() |
|
|
|
|
@ -171,7 +172,7 @@ class FacebookLoginOrRegistration(View): |
|
|
|
|
else: |
|
|
|
|
email = email.lower() |
|
|
|
|
try: |
|
|
|
|
user = User.objects.get(email=email) |
|
|
|
|
user = User.objects.get(email__iexact=email) |
|
|
|
|
except User.DoesNotExist: |
|
|
|
|
first_name = data.get('first_name', '') |
|
|
|
|
last_name = data.get('last_name', '') |
|
|
|
|
|