• Resolved rinh

    (@rinh)


    Greetings, the UM Action dropdown menu is visible for everyone with the list_user capability. They can’t use it, but they find it confusing and wondering if they are supposed to be able to see it and if it works. Any way to remove this so it’s only visible for administrator?

    Thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @rinh

    Could you please provide a screenshot of the UM Action dropdown you’re referring to?

    Regards,

    Thread Starter rinh

    (@rinh)

    Hi, yes here’s an image of it. This is on WordPress Dashboard users.php page. Users with the list_users capability gets this dropdown. They’ll get a permission error trying to use it so it’s not a huge issue, just confusing.

    https://i.imgur.com/y1fvqWC.png

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @rinh

    Sorry for the late response.

    You can use this code snippet to hide that dropdown:

    add_action("admin_init", function(){
        if( ! current_user_can('manage_options') ){
            remove_action( 'restrict_manage_users', array( UM()->users(), 'restrict_manage_users' ) );
        }
    });

    Regards,

    Thread Starter rinh

    (@rinh)

    Worked great! Thank you so much.

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

The topic ‘Remove UM Action dropdown for everyone except admin’ is closed to new replies.