def getACUserRecordForNameVar(authorNameStr,conn):

    # I do not know what the ACIS string-normalization process resembles.
    #authorNameStr=sub('['+escape(punctuation)+']','',authorNameStr.lower())
    authorNameStr=normalizeAunex(authorNameStr)

    return getMongoDBColl(AUTHORCLAIM_USERS_MONGODB_COLL,conn).find_one({'nameVariations':authorNameStr})
def checkIfACUserHasClaimedText(authorNameStr,amfText):

    # I do not know what the ACIS string-normalization process resembles.
    #authorNameStr=sub('['+escape(punctuation)+']','',authorNameStr.lower())
    authorNameStr=normalizeAunex(authorNameStr)

    conn=getMongoDBConn()
    record=getACUserRecordForNameVar(authorNameStr,conn)
    conn.disconnect()
    
    if not record:return record
    return amfText.get('ref') in record['isauthorofTexts']