Closed (fixed)
Project:
Organic groups Invite
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 May 2013 at 16:39 UTC
Updated:
18 Sep 2013 at 13:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
duaelfrI have no time at the moment to recode this module but I will need it in about a month.
As soon as it will be rewriten without the need of this patch, il will release an alpha version.
If you have skills and a bit of time, patches are welcome.
Comment #2
chromix commentedI have little bit of both, so I'll post a patch here in a day or so. Watch this space.
Comment #3
chromix commentedMy approach was to use the "Pending" state, and I added a field to the OG Membership entity for the invite status, as per the suggestion from Amitaibu. I added a load hook to the membership entity that changes the GID to 0 (only on load) for any membership that has an invite status. This prevents administrators from acting on memberships that are supposed to be accepted or rejected by the invitee, and it also makes the subscribe/unsubscribe links work as expected when a user has a membership record with an invite status. I also added a request message that shows the administrators that the user was invited and who invited them.
I also found a massive security hole in the autocomplete function (only when user_relationships is enabled) that switches to whatever user the searched for in the autocomplete. It's an easy mistake to make... basically the $user variable was reused in a foreach() after global $user was called earlier in the code. The problem is fixed with this patch so we should be good.
I also fixed up wording on a few parts of the interface (your English is good, but mine is better ;).
Let me know if there are any bugs you find as you test this and I'll do the same. Thank you for writing such a great module!
Comment #4
estrejlau commentedChromix, there are some issues with your patch, specifically with your setting of the GID to 0. It causes an issue in the OG admin members view when group admins try to perform any action on a user. I'm in the process of modifying your patch.
Comment #5
duaelfrYour patch looks good Thomas !
Let's wait a little to see what Ellie can do with her issues.
Thank you both !
Comment #6
duaelfrI made a release of the module using a custom Field. Everything is highly inspirated by your patch so thank you again !