• Resolved goofydoo

    (@goofydoo)


    I added the integration codes to functions.php but still cannot link Ultimate Member’s username to their profile page.

    The codes title say,

    // Ultimate Member Profile Display Name Integration //

    but I use username. Will that be the reason?

    So i tried adding username to this line

    $column = 'display_name'; // Other options: 'user_login', 'user_nicename', 'nickname', 'first_name', 'last_name'

    and made it

    $column = 'display_name'; // Other options: 'user_login', 'username', 'user_nicename', 'nickname', 'first_name', 'last_name'

    but still did not work.

    Can someone help, please?

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support gVectors Support

    (@gvectorssupport)

    Hi goofydoo,

    We tested it on our end and didn’t find any issue.

    Please try to deactivate all plugins except wpDiscuz and Ultimate Member and test again.
    In case that the issue will exist let us know.

    Thread Starter goofydoo

    (@goofydoo)

    Hi there,

    I forgot that I’m actuially using UM 2.0. I assume when you testted you’re testing with the current version of UM posted in the WP repo here. Currently, UM 2.0 is only available on UM website

    http://docs.ultimatemember.com/article/262-manually-updating-to-2-0

    So i tried making comments using old users from before UM 2.o and they do work with your user integration. But once I use the latest users from UM 2.0, they stopped working.

    If that is indeed the cause of the problem, it’s probably time to update those integration codes or the entire WP Discuz will eventually wind up un-usable for UM users, which is my case right now, even if i want to use it.

    Thank you.

    I also have this problem as well.

    It seems the integration codes only works in the earlier versions of UM and doesn’t work in the most latest one (2.0) do wpdiscuz haven’t updated to a new code? Thank you for your time.

    • This reply was modified 8 years, 3 months ago by pokefan.
    Plugin Support gVectors Support

    (@gvectorssupport)

    Hi pokefan,

    Please use the following code, put it in current active functions.php file:

    ////////////////////////////////////////////////////////////////////////
    // Ultimate Member Profile Display Name Integration ////////////////////
    ////////////////////////////////////////////////////////////////////////
    add_filter('wpdiscuz_comment_author', 'wpdiscuz_um_author', 10, 2);
    function wpdiscuz_um_author($author_name, $comment) {    
        if ($comment->user_id) {
            $column = 'display_name'; // Other options: 'user_login', 'user_nicename', 'nickname', 'first_name', 'last_name'
            if (class_exists('UM_API') || class_exists('UM')) {
                um_fetch_user($comment->user_id); $author_name = um_user($column); um_reset_user();
            } else {
                $author_name = get_the_author_meta($column, $comment->user_id);
            }
        }
        return $author_name;
    }
    ////////////////////////////////////////////////////////////////////////
    // Ultimate Member Profile URL Integration /////////////////////////////
    ////////////////////////////////////////////////////////////////////////
    add_filter('wpdiscuz_profile_url', 'wpdiscuz_um_profile_url', 10, 2);
    function wpdiscuz_um_profile_url($profile_url, $user) {   
        if ($user && (class_exists('UM_API') || class_exists('UM'))) {
            um_fetch_user($user->ID); $profile_url = um_user_profile_url();
        }
        return $profile_url;
    }   
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Ultimate Member integration doesn’t work’ is closed to new replies.