def _insert_user_info(model, cursor):
user_ids = set([])<EOL>for role_attr in cnxepub.ATTRIBUTED_ROLE_KEYS:<EOL><INDENT>for role in model.metadata.get(role_attr, []):<EOL><INDENT>user_ids.add(role['<STR_LIT:id>'])<EOL><DEDENT><DEDENT>cursor.execute("<STR_LIT>",<EOL>(list(user_ids),))<EOL>try:<EOL><INDENT>existing_user_ids = [x[<NUM_LIT:0>] for x in cursor.fetchall()]<EOL><DEDENT>except TypeError:<EOL><INDENT>existing_user_ids = []<EOL><DEDENT>new_user_ids = [u for u in user_ids if u not in existing_user_ids]<EOL>for user_id in new_user_ids:<EOL><INDENT>cursor.execute("""<STR_LIT>""", (user_id,))<EOL><DEDENT>
Insert the user shadow table info.