Hello
I just noticed that members have access to edit activity posts of achievements made within GamiPress.
If one of my members get an achievement (a badge) they’re able to edit that like if they made the activity post themselves which is not optimal.
Can this be fixed please?
Thanks! 🙂
Hello Katrine,
Thank you for posting. The activities generated by “Gamipress” are normal activities just like user-posted activities but in this case, The Gamipress plugin is posting these for the user on some kind of achievements that’s why they are able to edit those activities as well. But with small code, you can restrict users from editing such activities. Please use the following code in the file “bp-custom.php”
add_filter( 'bp_editable_activity_can_edit_activity', function ( $can, $activity ) { if ( isset( $activity->component ) && 'gamipress' == $activity->component ) { $can = false; } return $can; }, 10, 2 );
More info on “bp-custom.php”. Check here: https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/
Regards
Ravi
The topic ‘ [Resolved] BuddyPress Edit and GamiPress’ is closed to new replies.