Good Morning,

Would it be possible to have different types of membership as in Organic Groups?

Regards,
Tranko.

Comments

kristiaanvandeneynde’s picture

Hi there,

Coincidentally, I've got this in my notes: "Fieldable memberships?" :)

A GroupType entity defines what fields a Group entity of that type will have. So the GroupType acts as a bundle for Group. The problem that's been holding me back is: How do I define what bundle a membership will have?

Adding a GroupMembershipType entity may not do the trick because I can't currently imagine where and how you would specify them. Does every GroupType get its own GroupMembershipType? Probably not because you don't want to configure the same thing over and over should you wish to share them.

Perhaps we could define GroupMembershipTypes as 'templates' and force site builders to select one for each GroupType: that way you could share them over different group types, but you'd still be limited to one GroupMembershipType per GroupType.

Perhaps you could provide me with some insights and the use case you're looking at? The more use cases I've got, the easier it will be for me to decide what action to take.

Tranko’s picture

Hello,

Although I'm not going to use for this, as requested in Organic Groups usually to have members with time, so depending on payment status, or points or inactivity, shall retain their membership while others lose their membership.

In my case, I want to use membership as a state to manage events, the so as to create an event (which is a group) and request entry to the group is assigned a type of membership, when you checkout, you are assigned other membership; if proposed activity, then the membership would be the collaborator. In all cases the role is the same, but I want to distinguish between the different membership group members.

regards,
Tranko.

kristiaanvandeneynde’s picture

So basically you want to add a field to a membership? :)

Tranko’s picture

Yes, a status field, or more fields, depending on various combinations.
I'm trying to work with Entity Reference + Rules + Views, but may be fieldables memberships that would be fantastic for me.

Tranko’s picture

Ahhh I forgot, one of the best uses of fieldable membership is using the data to take the member to a determinate role, or make a form to the user to ask something in the membership to denied enter o not.

Thanks a lot!

kristiaanvandeneynde’s picture

Status: Active » Postponed

Okay, setting this to postponed then as I'm still on the fence about this.

ctrladel’s picture

I recently ran across 2 instances where it would be useful to have fields on a membership.

The first is I would like to be able to designate a member as being full time, 3/4 time, 1/2 time, or 1/4 time and since this is a field that can change for a user over time I would like to store it at the member level instead of the user level.

The second is I am combining some numbers from nodes that reference a group and I need to break the numbers up and assign them to different members within the group but the numbers are only useful for that group and no other groups, the first solution that popped into my head was to add a field to the group membership.

I wrote down my thoughts for implementation but then realized your template idea was pretty much my idea but way better.

kristiaanvandeneynde’s picture

Hmm, once my schedule clears up I'll start thinking about this. There are a lot of gotchas to the concept, though :/

kristiaanvandeneynde’s picture

Priority: Minor » Normal
Status: Postponed » Needs review

Okay in the latest dev it is possible to attach fields to memberships.

Note that:

  • this is just like you attach fields to users, i.e.: there is just one bundle which is active everywhere
  • work is in progress to create a sort of Profile2 submodule for memberships which will allow you to specify 'membership profiles' that can be added to a membership
  • I will only commit aforementioned submodule after some people have reviewed the current incarnation of fieldable memberships

Files were moved, clear your caches after updating to the latest dev!

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

Due to lack of response, I've gone and tested it myself.
Check out alpha4 for the newest fieldable member functionality and open a new ticket if anything pops up.

Tranko’s picture

Hi.

Forgive the delay in test functionality.
I'm trying to get the user if they wish to join the group should complete the membership fields, is it possible, how?

Edit: Im using the version 7.x-1.0-alpha3+8-dev, when you will update to the 7.x-1.0-alpha4?

Regards,
Tranko.

kristiaanvandeneynde’s picture

Alpha 4 is out now, it got some delay from the automated release bot.

The problem with having members fill out a form before they become members is that they are still outsiders while filling out the form. This means we can't give them member-only permissions such as 'edit x profile'.

It's also a usability issue to first have someone register to the website and then have them register again to a group. On the other hand, making memberships fieldable and not being sure your required fields will be filled out is also weird.

We could add a new button 'Subscribe' instead of 'Join group' which shows a form first, but then it would still only be able to load the default member fields (and not the profile ones) because the subject would still be an outsider at that point.

kristiaanvandeneynde’s picture

Actually, I've got an idea. Hold on :)

Tranko’s picture

Great. I look forward, I'll try the other things at the moment works well and does not throw any error.

kristiaanvandeneynde’s picture

I've just created an alpha5 which has this functionality.

Check the permissions for 2 new ones:

  • Join group (form)
  • Request group membership (form)

As always, clear your caches when updating.

Tip: All profiles available to regular members will also show up on the join or request form.

ydahi’s picture

I have a use case that might throw a wrench in the new permissions scheme:

- user (member_x) requests to join group
- group admin (member_a) approves request
- member_x does not have any group role (other than the default "member") upon approval

This is currently problematic because I want to limit which roles can leave the group.

If I specify that the default "Member" role can leave the group, this inherently includes the group admin.

This is also true for any permissions that I want to give members only (i.e. permissions that group members can have and the group admin cannot have). For instance, I may want members to be able to create certain node types, while admins cannot.

I realize that the group admin can assign roles to members, but it would be ideal if this was automatic (if there was a default role).

Is it possible to specify a default Member Role (like Creator Role) when a user is approved/joins a group? I tried to create a rule that would handle this to no avail.

Thanks for your time and a great module :-)

kristiaanvandeneynde’s picture

  • Event: "After saving a new group membership"
  • Condition: "Data comparison"
    Parameter: Data to compare: [group-membership:group:group-type], Data value: MyGroupType
  • Action: "Add a variable"
    Parameter: Type: Group role, Value: my_role_machine_name
    Provides variables: Group role (group_role)
  • Action: "Add an item to a list"
    Parameter: List: [group-membership:roles], Item to add: [group-role], Enforce uniqueness: true
Tranko’s picture

Its works fine! Thanks a lot!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ctrladel’s picture

I am getting started on adding some fields to memberships so far everything has worked out fine.