This repository has been archived on 2022-05-05. You can view files and clone it, but cannot push or open issues or pull requests.
userausfall/userausfall/views.py

8 lines
189 B
Python

from userausfall.models import User
def get_authenticated_user(request) -> User:
if request is not None and request.user.is_authenticated:
return request.user
return None