def get_user(request):

    sess_id = request.cookies.get("session_id")
    if not sess_id:
        return None
    sess = db.query(UserSession).filter(
        UserSession.session_id == sess_id).first()
    if not sess:
        return None
    if not sess.user:
        return None
    return { "username": sess.user.username }
Reset this object to draft status.
dataset/ETHPy150Open nullism/pycnic/examples/full-auth.py/get_user--crossover with--dataset/ETHPy150Open mozilla/moztrap/moztrap/model/mtmodel.py/DraftStatusModel.draft