def auth(request):
    if hasattr(request, 'user'):
        user = request.user
    else:
        from django.contrib.auth.models import AnonymousUser
        user = AnonymousUser()
    return {
        'user': user,
        'messages': user.get_and_delete_messages(),
        'perms': PermWrapper(user),
    }
Returns context variables required by apps that use Django's authentication
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/core/context_processors.py/auth