2019-01-10 12:33:45 +00:00
|
|
|
from social_core.pipeline.social_auth import associate_by_email
|
|
|
|
|
|
|
|
|
2018-10-10 17:56:43 +00:00
|
|
|
def staff_me_up(backend, details, response, uid, user, *args, **kwargs):
|
|
|
|
user.is_staff = True
|
|
|
|
user.save()
|
2019-01-10 12:33:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
def associate_by_personal_email(backend, details, user=None, *args, **kwargs):
|
|
|
|
return associate_by_email(backend, {
|
|
|
|
'email': details.get('personal_email'),
|
|
|
|
}, user, *args, **kwargs)
|