BuddyPress

 

If you have Buddypress and you want to display the users photos on his profile page, put this in the profile page template:

<?php
global $bp;
$owner = $bp->displayed_user->userdata->user_login;
echo apply_filters( 'the_content', '[wppa type="thumbs" album="#upldr,'.$owner.'"][/wppa]' );
?>

If this does not work, try this:

<?php
global $bp;
$owner = $bp->displayed_user->userdata->user_login;
echo wppa_insert_shortcode_output( do_shortcode( '[wppa type="thumbs" album="#upldr,' . $owner . '"][/wppa]' ) );
?>

If you only want to show the photos from sub-albums of a certain album, e.g. the album with name: Members, change the shortcode into: (note the $ sign in front of the albumname)
[wppa type="thumbs" album="#upldr,' . $owner . ',$Members"][/wppa]
this is equivalent to (assuming the album id of the Members album is 23):
[wppa type="thumbs" album="#upldr,' . $owner . ',23"][/wppa]

You can change the shortcode as you like, the trick is the insertion of the username: $owner, being the var that holds the username of the profile being watched.