adapters.py 423 Bytes
Newer Older
1 2 3 4 5 6
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter


class SocialAccountAdapter(DefaultSocialAccountAdapter):

    def populate_user(self, request, sociallogin, data):
7
        user = super(SocialAccountAdapter, self).populate_user(request, sociallogin, data)
8 9 10 11 12

        # FIXME: Is it possible to import more info from a Social Account (Facebook)?
        user.name = data.get('name')

        return user