Upload image to wordpress

Output during saving

You can not print something during the data is saved. If you use die( var_dump( $your_var ) ); it will print the values, but also stops the script. The reason is, first the data will be parsed. Then you will be redirected back to profile.php. So everything you print while parsing the data, will be lost when you got redirected.

You have to get the user metas and check if an image was saved in the user metas.

function UploadField( $user ) {
  if ( ! current_user_can( 'edit_user' ) )
    return false;

$profile_image_id = get_user_meta( $user->ID, 'profile_photo', true );
$profile_image = wp_get_attachment_image( $profile_image_id );

if ( ! empty( $profile_image ) )
//display image
echo $profile_image;
// else 
// and/or display form for uplaod image

Some issues with the code

if ( ! current_user_can( 'edit_user' ) )
  return false;

current_user_can() expect only one parameter.

update_user_meta( $user_id, 'profile_photo', $_POST['profile_photo'] );

$_POST is a superglobal, it does not contain the informations you want. replace var_dump( $uploaded_file ); with update_user_meta( $user_id, 'profile_photo', $attach_id ); (or replace $attach_id with the data you want to store)