Forums

How Do I use Use $user->ID properly (5 posts)

  1. artslob
    Member
    Posted 2 years ago #

    Hey all. I know this is primarily a php question but I'm tearing my eyes out trying to get this "avatar plugin" for bbpress to work.

    Basically it says that I need to
    Use the available $user->ID for the page you place the link on

    can someone tell me what this means?

    How do i properly use the $user->ID???

    This is the code i'm working with.

    ID, 'avatar'); ?>"><?php _e("Upload Avatar"); ?>

    Any help greatly greatly appreciated!

    Cheers!

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    You might provide a link to the plugin '"avatar plugin" to help someone help you.

  3. artslob
    Member
    Posted 2 years ago #

    <?php profile_tab_link($user->ID, 'avatar'); ?>"><?php _e("Upload Avatar"); ?>

    There's the Php. Sorry it linked to it in the last post. Am I supposed to change the User->ID to something else? If so, how do you name it?

  4. artslob
    Member
    Posted 2 years ago #

    http://bbpress.org/plugins/topic/avatar-upload/installation/

    here's the plugin im working with. sorry

  5. MichaelH
    Volunteer
    Posted 2 years ago #

    Well can show you how WordPress would display an avatar for a logged in user:

    <?php
    global $userdata;
    get_currentuserinfo();
    echo get_avatar( $userdata->ID, 46 );
    ?>

    Also this plugin works to put a avatar on the user profile page in WordPress:
    http://wpmudev.org/project/gravatar-preview-on-profile-pages/download

Topic Closed

This topic has been closed to new replies.

About this Topic