You should be using get_users()
– this will perform your query and also allow you to limit by role.
http://codex.wordpress.org/Function_Reference/get_users
userphoto
isn’t a WordPress function, but get_avatar()
is:
http://codex.wordpress.org/Function_Reference/get_avatar
Just check out the Codex examples and you should be able to modify to suit your needs!
— UPDATE —
I reread and realized maybe userphoto
is coming from another plugin – yes? If so, check if the result of that function echos the result. If so, you will need to change that part to:
echo '<li class="author" id="author-'.$author->ID.'">';
userphoto($author->ID);
echo '</li>';