Get WordPress User Profile Url/Link by ID

I managed to show up the users Profile Images from the mainsite xxxxx.com/
in my bbpress forum xxxxx.com/forum/ with the following code:

<?php $user_info = get_user_by('id', $wp_query->query_vars['author']); echo get_avatar($user_info->ID, '150'); ?>

Question:

Read More

How can i get the Users Profile URL/LINK like xxxxxx.com/user/username with the same method?

Thank you so much!

Related posts

Leave a Reply

5 comments

  1. If you want to edit a user from admin side then you can use this:

    function get_admin_edit_user_link( $user_id ){
    
        if ( get_current_user_id() == $user_id )
           $edit_link = get_edit_profile_url( $user_id );
        else
           $edit_link = add_query_arg( 'user_id', $user_id, self_admin_url( 'user-edit.php'));
    
        return $edit_link;
    }