This repository has been archived on 2022-05-05. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
userausfall/userausfall/views.py

7 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