'Override default method to add multiple emails in an account.'

def filter_users_by_claims(self, claims):

    email = claims.get('email')
    request_user = self.request.user
    if (not email):
        return self.UserModel.objects.none()
    account_type = ExternalAccount.TYPE_EMAIL
    alternate_emails = ExternalAccount.objects.filter(type=account_type, identifier=email)
    primary_email_qs = Q(email=email)
    alternate_email_qs = Q(userprofile__externalaccount=alternate_emails)
    user_q = self.UserModel.objects.filter((primary_email_qs | alternate_email_qs)).distinct()
    if (user_q.exists() and (user_q.count() == 1)):
        profile_id = user_q[0].userprofile.id
        profile_qs = UserProfile.objects.filter(pk=profile_id)
        profile_qs.update(auth0_user_id=claims.get('user_id'))
    if request_user.is_authenticated():
        if (not user_q):
            ExternalAccount.objects.create(type=account_type, user=request_user.userprofile, identifier=email)
        elif (not user_q.filter(pk=request_user.id).exists()):
            msg = u'Email    {0}    already    exists    in    the    database.'.format(email)
            messages.error(self.request, msg)
        return [request_user]
    return user_q
