Support

Account

Home Forums General Issues how I can obtain the user id in ACF user field

Unread

how I can obtain the user id in ACF user field

  • Hello, I want Know how i can validate the current_user wordpress with a ACF user field, how I can obtain the user id in ACF user field?

    <?php
    $current_user = wp_get_current_user();
    echo $current_user->ID ?>

    $client_user = the_field( ‘client_user’,’user_’.$UserID);
    echo $client_user ?>

    <?php if (current_user_can(‘administrator’) || current_user_can(‘client’) && $current_user == $client_user): ?>

    thank you very much.

Viewing 1 post (of 1 total)

The topic ‘how I can obtain the user id in ACF user field’ is closed to new replies.