'Checks if the user has any 2FA configured.'

def user_has_2fa(self, user):

    return Authenticator.objects.filter(user=user, type__in=[a.type for a in available_authenticators(ignore_backup=True)]).exists()
