Given that the patch noted as a blocker is now a won't fix, does it make sense to change the approach of this module to accommodate the new direction of OG? If you've moved on from this module I understand, but I feel this is useful functionality, particularly for people who are used to the old OG functionality before the rewrite, and I'd like to see a full release!

CommentFileSizeAuthor
#3 stateless_invite-1988260-3.patch8.66 KBchromix

Comments

duaelfr’s picture

I 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.

chromix’s picture

I have little bit of both, so I'll post a patch here in a day or so. Watch this space.

chromix’s picture

StatusFileSize
new8.66 KB

My 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!

estrejlau’s picture

Chromix, 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.

duaelfr’s picture

Status: Active » Needs work

Your patch looks good Thomas !
Let's wait a little to see what Ellie can do with her issues.

Thank you both !

duaelfr’s picture

Version: » 7.x-1.0-beta2
Status: Needs work » Fixed

I made a release of the module using a custom Field. Everything is highly inspirated by your patch so thank you again !

Status: Fixed » Closed (fixed)

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