Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @greekdish,

    Sorry for the delayed response. Thanks for pointing that out. I’ve fixed it in my code. What is interesting is that it was working with the ! in there. I will have to debug to find out why.

    @tpflanz,

    I appreciate that but that does not seem to work with Multisite. Also I want to avoid granting these users the delete_users capability, they are still intended to be lower level users even though they need edit_user privileges. They are not supposed to be able adjust any settings, pages, or posts.

    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?

Viewing 2 replies - 1 through 2 (of 2 total)