• I have created a directory where the delegates for an event register their profile.
    On detailed information of a member, I have added a contact form, where other delegates can contact the person whose profile card they are viewing.
    To send mail to Ultimate member, I used the following code from https://gist.github.com/cryptexvinci/2831827bc0ff23206a85fee1650b229e
    to pull fields value of the member profile.
    The code is
    // Display field data of Ultimate Member
    add_shortcode( ‘um_field_data’, ‘um_custom_field_shortcode’ );

    if ( ! function_exists( ‘um_custom_field_shortcode’ ) ) {
    function um_custom_field_shortcode( $atts = array() ){

    $defaults = array(
    ‘field’ => NULL,
    );

    $atts = wp_parse_args( $atts, $defaults );
    extract( $atts );

    ob_start();

    $user_id = um_user(‘ID’);
    um_fetch_user( $user_id );
    $meta_value = um_user($atts[‘field’]);

    echo $meta_value;

    $shortcode_content = ob_get_contents();
    ob_end_clean();

    return $shortcode_content;
    }
    }

    Using this shortcode
    [um_field_data field=”user_email”]
    on any member’s profile card page should bring UM member’s email id.
    But this brings the admin’s email (or logged in current user’s email) and not the UM member’s.

    Please help, how can I get the delegate’s email and not the logged in user’s?

    The delegates directory is at https://www.momsurecan.com/delegates-2/

  • The topic ‘email id of member’ is closed to new replies.