Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
admin/config/group/group-membership/manage/og_membership_type_default/fields
I'd like to request feature that user can change the field's value after accepted to the Group.
For example if there's a field that asks users for "other site's username", then after the user has been accepted to the group there would be some way the user can change the value he/she entered to "other site's username" field.
Comments
Comment #1
johnnydarkko CreditAttribution: johnnydarkko commentedI wanted to allow users to edit their own membership and this is how I was able to achieve this. Hope this helps you and anyone else trying to find this answer, ifish! I was able to achieve this by creating a custom module (referred to as mymodule here).
First, I created an og permission to allow the admin to configure who can edit their own og membership entity:
Then, I implemented hook_menu_alter to override the access control over the og_membership edit page:
The custom access callback will replace the callback provided by og_ui.module.
Hope this helps!
Comment #2
jemisond CreditAttribution: jemisond commented@johnnydarkko- great help- thanks!!
One minor issue- you're missing a closing curly brace at the end of function mymodule_og_permission().
The problem that I have with the implementation is that the user now gets to modify his own roles and can give himself a higher role.
Comment #3
johnnydarkko CreditAttribution: johnnydarkko commentedaha! good catch @jemisond! Added that missing closing bracket to my comment above.
Comment #4
pixelsweatshop CreditAttribution: pixelsweatshop commented@johnnydarkko. This is a nice little module to add that functionality. Any thoughts on releasing it on D.O?