python
def my_view(request):
    if request.user.is_authenticated:
        # Access user data using request.user
        username = request.user.username
        email = request.user.email
        # ...
    else:
        # Handle the case when the user is not authenticated