diff options
author | adityacp | 2018-01-08 11:05:36 +0530 |
---|---|---|
committer | adityacp | 2018-01-08 11:05:36 +0530 |
commit | 01e55880d2d9018c55435764d3c34338b91b5d77 (patch) | |
tree | d760712f390f4363c01f5ddcfd910f5bddf5fa9f | |
parent | feb295b4107a95621e9430f5c7042cfde4674cc0 (diff) | |
download | online_test-01e55880d2d9018c55435764d3c34338b91b5d77.tar.gz online_test-01e55880d2d9018c55435764d3c34338b91b5d77.tar.bz2 online_test-01e55880d2d9018c55435764d3c34338b91b5d77.zip |
Change user.py to set email_verified to True for oauth based login
-rw-r--r-- | yaksh/pipeline/user.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yaksh/pipeline/user.py b/yaksh/pipeline/user.py index 4aecd95..d5ec292 100644 --- a/yaksh/pipeline/user.py +++ b/yaksh/pipeline/user.py @@ -1,8 +1,11 @@ from yaksh.models import Profile -#from django.contrib.auth.models import User + def save_profile(backend, user, response, *args, **kwargs): if not hasattr(user, 'profile'): profile = Profile.objects.create(user=user) profile.roll_number = profile.id - profile.save() + else: + profile = Profile.objects.get(user=user) + profile.is_email_verified = True + profile.save() |