• Resolved beanz7890

    (@beanz7890)


    Hi,

    I’ve gotten the adi_thumbnailphoto meta property populating and when I base64 decode the data from the database to a file on my PC I see the correct image.

    However, whenever I use <?php echo $user->adt_user_photo_url ?> in my template, for example on the author page, I am presented with a generated Wavatar rather than the users photo.

    What am I missing?

    http://wordpress.org/extend/plugins/active-directory-thumbnails/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Omar Mir

    (@mirwindsor-omar)

    Could you post the entire block of code where you are trying to paste the field?

    Thread Starter beanz7890

    (@beanz7890)

    <div class="author-info">
    				<div class="author-avatar">
    					//AVATAR
    					<?php echo $user->adt_user_photo_url
    
    					/*<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 60 ) ); ?>*/?>
    				</div><!-- .author-avatar -->
    				<div class="author-description">
    					<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
    					<p><?php the_author_meta( 'description' ); ?></p>
    				</div><!-- .author-description	-->
    			</div><!-- .author-info -->
    Plugin Author Omar Mir

    (@mirwindsor-omar)

    Hi, you haven’t really created the $user object. Try this:

    <?php
    $userID = get_the_author_meta('ID');
    $user = get_userdata( $userID );
    echo $user->adt_user_photo_url;
    ?>

    Make sure to close the php before you open another one as well.

    Thread Starter beanz7890

    (@beanz7890)

    Excellent, all working.

    Thank you for coming back to me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to display avatar’ is closed to new replies.