tpflanz and Vladimir,
Thanks for this post, it made finding the code I needed to edit extremely easy. I am running a multisite installation that I need non-super admin users to be able to edit users on one specific site. To achieve this I have granted them edit_users capability via the User Role Editor as well as some hackery elsewhere.
Why doesn't User Avatar allow users with edit_user privileges the ability to change other users avatars? It's easy to code.
Instead of this in user-avatar.php:
if(($profile->ID == $current_user->ID || is_super_admin($current_user->ID)))
I changed it to this:
if(($profile->ID == $current_user->ID || ! current_user_can(‘edit_user’, $current_user) || is_super_admin($current_user->ID)))
Now I know this is not recommended because it'll break on the next update but I need the feature. Can either of you think of a better way to do this than granting the users Super Admin rights?