Is it possible to restrict image uploads to only the user’s own galleries in a group? I see that all members of a group can post to any gallery. I am using Mediapress with Buddypress integrated into Tutor LMS.
Hello Sergio,
Thank you for the posting. Please use the following code:
add_filter( 'mpp_user_can_upload', function ( $can_do, $component, $component_id, $gallery ) { // Only allow uploads to the user's own galleries. if ( 'groups' === $component && get_current_user_id() != $gallery->user_id ) { $can_do = false; } return $can_do; }, 10, 4 );
Please let me know if it helps or not.
You can use this code in your active theme “functions.php” file or “bp-custom.php” file.
If you do not know what is bp-custom.php file. Look at the following link:
https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/Regards
Ravi
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘ [Resolved] Restrict upload to own gallery’ is closed to new replies.
This topic is: resolved