Ultimate Member

 

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

<?php
if ( function_exists( 'um_profile_id' ) ) {
	$user = get_user_by( 'id', um_profile_id() );
	$owner = $user->user_login;
	echo apply_filters( 'the_content', '[wppa type="thumbs" album="#upldr,'.$owner.'"]' );
}
?>

If this does not work, try this:

<?php
if ( function_exists( 'um_profile_id' ) ) {
	$user = get_user_by( 'id', um_profile_id() );
	$owner = $user->user_login;
	echo wppa_insert_shortcode_output( do_shortcode( '[wppa type="thumbs" album="#upldr,' . $owner . '"]' ) );
}
?>

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"]
this is equivalent to (assuming the album id of the Members album is 23):
[wppa type="thumbs" album="#upldr,' . $owner . ',23"]

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.