authentication/admin_authentication.py
def is_logged_in():
    """ automatically logs out the researcher if their session is timed out. """
    if EXPIRY_NAME in session:
        expiry_datetime = session[EXPIRY_NAME]
        if is_naive(expiry_datetime):
            if expiry_datetime > datetime.now():
                return SESSION_UUID in session
        else:
            if expiry_datetime > timezone.now():
                return SESSION_UUID in session

    logout_researcher()
    return False
 automatically logs out the researcher if their session is timed out. 
automatically logs out the researcher if their session is timed out.
automatically logs out the researcher if their session is timed out .
def is_logged_in():
    if EXPIRY_NAME in session:
        expiry_datetime = session[EXPIRY_NAME]
        if is_naive(expiry_datetime):
            if expiry_datetime > datetime.now():
                return SESSION_UUID in session
        else:
            if expiry_datetime > timezone.now():
                return SESSION_UUID in session
    logout_researcher()
    return False
def is_logged_in ( ) : if EXPIRY_NAME in session : expiry_datetime = session [ EXPIRY_NAME ] if is_naive ( expiry_datetime ) : if expiry_datetime > datetime . now ( ) : return SESSION_UUID in session else : if expiry_datetime > timezone . now ( ) : return SESSION_UUID in session logout_researcher ( ) return False
automatically logs out the researcher if their session is timed out.
automatically logs out the researcher if their session is timed out .
""" automatically logs out the researcher if their session is timed out. """