def email_associated(env, email):
    """Returns whether an authenticated user account with that email address
    exists.
    """
    for row in env.db_query("""
            SELECT value FROM session_attribute
            WHERE authenticated=1 AND name='email' AND value=%s
            """, (email,)):
        return True
    return False