From 01e55880d2d9018c55435764d3c34338b91b5d77 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 8 Jan 2018 11:05:36 +0530 Subject: Change user.py to set email_verified to True for oauth based login --- yaksh/pipeline/user.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'yaksh') 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() -- cgit