• Hi guys!

    I use the Ultimate Member profile page everywhere and it works everywhere except for ‘our newest member’. It shows the forum profile link. I deleted cache, but it didn′t help.

    A temporary fix is to change the wpforo_member_link function in functions-template.php to:

    if( wpfval($member, 'profile_url') ){
            um_fetch_user($member['ID']); $profile_url = um_user_profile_url();
    	    $link = '<a href="' . esc_url($profile_url) . '" ' . $color . ' ' . $class . ' ' . $title . '>' . ( strpos($prefix, '%s') !== FALSE ? sprintf( wpforo_phrase($prefix, FALSE), esc_html( wpforo_text($display_name, $length, FALSE) ) ) : ( $prefix ? wpforo_phrase($prefix, false) . ' ' : '') . ( $length ? esc_html( wpforo_text($display_name, $length, false) ) : esc_html($display_name) ) ) . '</a>';
            um_reset_user();
        }

    Anyone else facing this problem with UM?

    It looks like the forum profile url for the newest member is saved in the database options wpforo_stat: newest_member_profile_url.

    I think that′s a bug in wpforo. You should safe the um url…

Viewing 1 replies (of 1 total)
  • Hi!

    1) thanks for the snippet.. spent sometime myself to find that the offending function was ‘wpforo_member_link’.. your solution works well. Hopefully we will see that fixed in a new release of this amazing plugin.

    2) In my case I wanted also to prevent the navigation to the Admin user profile.. I am no expert but managed to get it done by tweaking a bit your code:

    
    	if( wpfval($member, 'profile_url') ){
    	
    		um_fetch_user($member['ID']); 
    		$profile_url = um_user_profile_url();
    		
    		if ( !user_can( $member['ID'], 'manage_options' ) ) {
    			// Non Admins
    			$link = '<a href="' . esc_url($profile_url) . '">' . ( strpos($prefix, '%s') !== FALSE ? sprintf( wpforo_phrase($prefix, FALSE), esc_html( wpforo_text($display_name, $length, FALSE) ) ) : ( $prefix ? wpforo_phrase($prefix, false) . ' ' : '') . ( $length ? esc_html( wpforo_text($display_name, $length, false) ) : esc_html($display_name) ) ) . '</a>';
    		} else {
    			// Is Admin
    			$link = '<span ' . $color . '> ' . ( $length ? esc_html( wpforo_text($display_name, $length, false) ) : esc_html($display_name) ) . '</span>';
    		}
    		um_reset_user();
    
Viewing 1 replies (of 1 total)
  • The topic ‘UM Integration – our newest member’ is closed to new replies.