Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable User to Create or Upload Media?


  • bigbankclub
    Participant

    @bigbankclub

    Is there a way to disable all users / except the admin to disable the ability for the user to upload media or documents?

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

  • Henry Wright
    Moderator

    @henrywright

    I’m wondering if the remove_cap() method is what you need. Try adding this to functions.php. Feel free to remove it after you’ve visited the front end of your site, it just needs to be run once.

    add_action( 'init', function() {
        $role = get_role( 'subscriber' );
        $role->remove_cap( 'upload_files' );
    } );

    You can do the same with the author and editor roles should you wish.


    bigbankclub
    Participant

    @bigbankclub

    Tried it — user can still create an album. And cans still upload. 🙁


    Henry Wright
    Moderator

    @henrywright

    user can still create an album

    You didn’t mention albums! Are you using a plugin?


    bigbankclub
    Participant

    @bigbankclub

    yikes… yes — buddymedia..


    Henry Wright
    Moderator

    @henrywright

    Just disallowing file uploads probably won’t work because BuddyMedia is likely to have extra functionality that needs to be disabled (such as albums)

    Try asking this same question on their support forum:

    https://wordpress.org/support/plugin/buddymedia

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar