Active
Project:
Group Membership Request
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2020 at 08:06 UTC
Updated:
10 Dec 2024 at 13:54 UTC
Jump to comment: Most recent
Comments
Comment #2
marcelovaniHey David, have you got any progress on this?
Comment #3
lobsterr commentedI wonder do we really need it?
1) I wanted to keep module as simple as possible
2) I don't want to introduce an unnecessary dependency
3) We don't have super complicated workflow there. It can go only one direction and we don't have specific restriction between the states. So, if a user has rights manage users, he can do whatever he/she wants.
4) It is always possible to send emails using another ways
Your thoughts? cons/pros?
Comment #4
umitIn my opinion, the user whose membership has been approved should know that it has been approved. I think that e-mail or message notification must be sent.
Comment #5
lobsterr commented@Umit I didn't say that we don't need notifications, but it is possible to implement it without integration state machine module.
And even switching to this field will require the same implementation.
It is exactly, what I mentioned in comment above
Comment #6
lobsterr commentedComment #7
dwkitchen commentedI am re-opening as the proposed resolution has not been accepted the requirement is still true.
Comment #8
lobsterr commented1) On our side we use message stack + SwiftMailer module, but this solution is not generic enough, but we can think how to make it generic
2) Another option is custom code
3) Rules module integration. I have done first steps in this ticket https://www.drupal.org/project/grequest/issues/3174612
In addition we need custom settings to on / off notifications, but it should be done on a group level and not on a group type level. Unfortunately, it is not supported by the group module.
We use entity_data module developed by us to solve the issue with custom settings for the groups (similar to user_data service). I'm in the process to get maintainer rights to publish it.
Anyway I see it as submodule of the current one.
Let's discuss it and find the best solution.
Comment #9
lobsterr commentedAfter another round of thinking about the issue I have decided to switch to state machine #3193333: Add support for state machine
Comment #10
lobsterr commentedI have implemented state machine for the status field. Now we have events:
For creation
For creation
For rejection
Now we need to think, which solution to use to send emails. Any proposals?
Also I wonder how do you see configuration pages?
Or from this point give users chance to use any implementations they want?
Comment #11
umitI follow the developments with interest. I am sure this module will become very useful in the future. It can also be via drupal standard mail to send emails.
Comment #12
mr.andrey commentedI'm trying to set up email notifications. Following the README, I added the following code to my custom module as the first step. Unfortunately, none of the test messages show up in the log.
What am I doing wrong?
Is there a different way to do it? I don't see group request events in rules.
Thanks.
UPDATE:
Nevermind, got it figured out.
For reference (helper123 is my custom module):
1. In helper123.services.yml, add:
2. In src/EventSubscriber/GroupMembershipEventSubscriber.php, add:
Comment #13
kecsotI've tested all events.
It works as LOBsTerr said in #9 and #10.
Works as designed. (For example: #12)
Comment #14
kecsotI think its enough for developers. We can write custom module to trigger actions or send message by another way.
This module extends group module so I suggest to follow group module's dependecies and keep grequest simple.
Comment #15
leonardo.montenegro commentedAbout 2 years ago, back when we were still using Groups v1 with older versions of all modules, we used the same example from @mr.andrey. It has been working fine throughout the time, but suddenly it's presenting issues after moving to Groups V3 and grequest v3.1.
In my case, I'm using the three events below:
From our tests, the ones from approval/rejection are being triggered just fine, but the create one (called after a Group Membership Request is created) isn't being called. As a result, our custom notification mechanism stopped working for new requests.
My guess is that it stopped working for the newer versions. At least as a temporary workaround, probably a "hook_group_relationship_insert" would work, for detecting any Group Membership Requests creation attempts.