Link users to a custom post type

I would like to link a user to a custom post type (college). Does anyone know a good way to do this?

The ultimate goal is to display links to view and edit their college

I’ve been using Advanced Custom Fields but none of the Relational fields seem to support linking users

Solutions Collecting From Web of "Link users to a custom post type"

if you are trying to link up the post in the user profile area, the code below might be a good starting point. You could put this in your functions.php file. The first function displays a select tag with all the posts from your custom post type in the user profile section. The option value is the post id, and the title is the post name. The next function saves the user profile information, adds or updates a user meta field(in this case, I used ‘userphotos’ that will store the ID of the post. When you want to display the user’s posts anywhere on the site, you can use WP_User_Query, and display the user’s metadata. If you are looking to include multiple posts, a check box or use the multiple attribute in the select tag, and store the posts as an array in the metafield. The code below isn’t tested, and wasn’t quite sure how you wanted the user profile section to function, so apologies if this isn’t what you are looking for.

<?php
function add_extra_user_fields( $user ) {
    $userid = get_user_meta($user->ID);
    $args = array(
     'post_type' => 'your_post_type',
     'posts_per_page' => -1,
    );
    $query = new WP_Query($args);
    ?>
    <select name="testprofile">Select a Post</p>
    <?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
        <option value="<?php the_ID(); ?>" 
        if (get_user_meta( $userid, userphotos, true) == $userid ){ 
            echo 'selected'; 
        }?>>
        <?php the_title(); ?>
        </option>
    <?php endwhile; endif; ?>
    </select>
    <?php
}

add_action( 'show_user_profile', 'add_extra_user_fields' );
add_action( 'edit_user_profile', 'add_extra_user_fields' );

function save_extra_user_fields( $user_id ) {
    update_user_meta( $user_id, 'userphotos', sanitize_text_field( $_POST['testprofile'] ) );
}

add_action( 'personal_options_update', 'save_extra_user_fields' );
add_action( 'edit_user_profile_update', 'save_extra_user_fields' );

Do not have enough reputation to comment, so:

Thanks to kcbluewave890 I found a solution, but there were some things to fix. Here is my working code for functions.php file:

function add_extra_user_fields( $user ) {
$args = array(
    'post_type' => 'YOUR_POST_TYPE',
    'posts_per_page' => -1,
);
$query = new WP_Query($args);
?>
<h3>Select Your College</h3>
<select name="college">
    <?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
        <option value="<?php the_ID(); ?>"
               <? if (get_user_meta( $user->ID, "college", true) == get_the_ID() ) echo 'selected'; ?>>
    <?php the_title(); ?>
    </option>
<?php endwhile; endif; ?>
</select>
<?php
}

add_action( 'show_user_profile', 'add_extra_user_fields' );
add_action( 'edit_user_profile', 'add_extra_user_fields' );

function save_extra_user_fields( $user_id ) {
update_user_meta( $user_id, 'college', sanitize_text_field( $_POST['college'] ) );
}

add_action( 'personal_options_update', 'save_extra_user_fields' );
add_action( 'edit_user_profile_update', 'save_extra_user_fields' );