You need to load the current user before you attempt to render the field:
<?php
global $user;
print render(field_view_field('user', $user, 'field_avatar'));
?>
You need to load the current user before you attempt to render the field:
<?php
global $user;
print render(field_view_field('user', $user, 'field_avatar'));
?>