fetching user photo or image URL
The picture property of the user entity is the file ID (a reference to the fid column in the file_managed table).

You can load the file explicitly with file_load() like so:

$file = file_load($user-&gt;picture);


And render it to an image using theme_image():

$image = theme('image', array(
  'path' =&gt; $file-&gt;uri,
  'alt' =&gt; 'Some alt',
  // etc...
));


Alternatively you could dispense with the above and just use the handy theme_user_picture() function:

$image = theme('user_picture', array('account' =&gt; $account));