Get user picture / avatar

Public

In your custom code (.module or template.php) do:

Get raw version
php
  1. $account = user_load('put_user_id_here'); // or user_load_by_name('put_user_name_here')
  2.  
  3. $user_picture = theme('user_picture', array('account' =>$account));