Needs review
Project:
OG Invite Link
Version:
6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2011 at 09:42 UTC
Updated:
29 May 2015 at 17:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
yugongtian commented+1
Comment #2
romany commented+1
Comment #3
jaxpax commented+1
Comment #4
stefan vaduva commentedIt seems that the invite functionality has been discontinued from OG core: http://drupal.org/node/1186962
I'll try to take a look at this module and see if I can help with the migration for D7.
Comment #5
stefan vaduva commentedBy looking at this module and at the way the new groups work, I'm thinking that a rewrite will be more useful than a port. The main reason why I'm saying this is because in the new version of OG everything can be a group while this module only handles groups as nodes.
Vasi1186, Mikestefff what do you think?
Comment #6
mstef commentedYea, I was going to state that the nature of OG in D7 has changed so drastically [part assumption] that a port doesn't make sense. I think OG and any invitation functionality present in D7 must first be studied to decide what, if anything, is needed.
Comment #7
Fidelix commentedSubscribing...
Comment #8
rv0 commentedsubscribe
Comment #9
james.williamssubscribe. I may get chance to work on invitation functionality in D7 very soon for a project we are currently working on. Is it worth setting up a sandbox?
Comment #10
rv0 commented@james.williams
also in the same position.. currently checking http://drupal.org/sandbox/stefanvaduva/1187048 for a D7 port of OG Invite
Comment #11
vasi1186 commentedHi,
If anyone wants to contribute for a drupal 7 porting, is welcome. If you clone the project, there should be a new branch for d7. So, if you would like to contribute, just tell me and we can see if I can add you as a module maintainer.
Comment #12
james.williamsI realise this might seem a bit like a fork - sorry for that, it's because we started to work on this before rv0 had posted about that other sandbox above, and because the full version of this has other site-specific additions - but see http://drupal.org/sandbox/jameswilliams/1228942 for a working D7 port, which also adds functionality to invite non-members (like was requested in http://drupal.org/node/1097578)
Comment #13
james.williams...I won't have time for a while to work at turning that work into something more useful like a patch for OG Invite Link, but it's on my long-term to-do list. If anyone wants to take a look and make any suggestions etc, please do.
Comment #14
medden commentedsubscribe
Comment #15
rafhuys commentedThanks james,
totally fits my needs. there was however a change in the og_group() method of og, so you need to change line 327 of og_invite_link.pages.inc.
Comment #16
james.williamsThanks rafhuys - I've committed most of those changes to my sandbox. I'm not sure what the following bit is about though?:
...So I've left this out for now.
Comment #17
james.williamsMeanwhile, here's a a fairly hefty patch for anyone preferring to use a patch rather than the sandbox.
Comment #18
Sylense commented+1
Comment #19
steffenr@james.williams - i just applied "patch" #16 to your sandbox's version - now the inivitation is working fine. Your sandbox's version just throws an error, that the invitation codes are incorrect..
Thx
Comment #20
jhrizz commentedNot to sound lazy, but would anyone be willing to post or email their final working product?
Also, if this is gaining legitimacy (as I think it is essential, not matter how it is done) should it be versioned to a true blue 7.x -dev?
Two questions, first one is more interesting (to me).
Cheers!
- Josh
Comment #21
james.williamsRafhuys was right all along about that chunk of code in comment #16... the configuration on my system meant a quirk of PHP stopped me seeing the issue. I've committed a fix to my sandbox, and an updated patch is attached.
@jhrizz you can find my sandbox at http://drupal.org/sandbox/jameswilliams/1228942 -- you have to check it out of Git, see the Version control tab for full directions. Otherwise, patch the original OG Invite Link with the attached patch.
Comment #22
james.williamsI think it's fair to say now that this is at the 'needs review' stage?
Comment #23
jhrizz commented@ james.williams
Will do! Thank you!
Comment #24
ohthehugemanatee commented@james.williams thank you for your great work on the sandbox. Jeez the module directory name is long :)
I tested this today against my D7-latest, here were the issues I found:
* Invitations seem to break on some symbols. For example, I use the + sign for development email accounts, ie ohthehugemanatee+test1@gmail.com . According to the email RFC, those messages get delivered to ohthehugemanatee@gmail.com . But any invitations created for that address failed validation and returned "not a valid invitation". Other invites were fine. Maybe it would be better to use the invite ID in the invite link instead of the email address, since that way we don't have to deal with symbols?
* The invitations worked, but never added my user to the group.
I would suggest a different approach... something like how LoginToboggan works with users... When an invite is generated for a non-user, actually create the user account with status blocked, or optionally active with an admin-specified role, and use Drupal's password reset function to generate the login link. Saves a lot of trouble. You can still use similar code for expiry, just check to see if the account has ever been used to login, and delete it if it hasn't. Since the account is actually created with the invite, you can actually add the user to the group right away. This would allow the group admin to go ahead and assign special group roles or whatever to that user, rather than having to wait for him to login.
I know what I'm suggesting is a substantial rewrite, but I think it's also much easier in a lot of ways. I'll try and poke at it this way and send my results back.
Comment #25
ohthehugemanatee commentedBefore anyone goes off on goose chases: the reason it wasn't adding my user to the group, is that I had a Rules redirect upon login that overrode the destination parameter in the URL. Another reason to actually create the account first. :)
Comment #26
james.williams@ohthehugemanatee I like your idea of creating user accounts and using the password reset functionality. Would you like commit access to my sandbox if you plan on doing some work on it? I'm very unlikely to do any further work on this myself for a good while.
Comment #27
medden commentedI get a problem with this line of code...
If I try to invite more than one person by email address, the !valid_email_address($account) fails for all except the last address....
anyone know why?
Comment #28
medden commentedFixed it, there was a carriage return within the $account string, which stopped it validating as an email..
Put this before the if statement to fix the issue.... (line 281 of og_invite_link.module).
Comment #29
ohthehugemanatee commentedHey james.williams ... sadly I don't think I'll have time, but I really like how transparently this module is coded so I'm sure I'll be working with it again in future. I found your code really clear and easy to work with!
One other idea too... it would be very cool to rewrite this in with Rules and Entity. Invitations are an Entity, which gets related to the OG target, maybe the OG membership type, the account of the invitor, and the (initially blocked) account of the invitee. Provide a trigger for when an invitation is created, and one for when it's redeemed. Then distribute a pair of Rules with the module, one that creates and blocks the account on invite creation, and one that unblocks and logs the user in when the invite is redeemed. That greatly cuts down the amount of code you need in the module. Just define the entity, define two triggers, and bundle the Rule in with it. Added bonus: no custom db table to maintain, so update paths should be easier.
Of course it's way easier for me to SAY this without actually contributing anything... sigh. Feel free to ping me in the summer, I might have some spare time to play with this in August and it would be fun to do a ground up Entity approach like this.
Comment #30
ezra-g commentedAdding the commonslove tag.
Comment #31
zdean commentedRe: #22, it looks like this does not work with OG 7.x 2.x dev
Comment #32
mohit_aghera commentedI am using Og 7.x-1.5
After installing that module from sandbox http://drupal.org/sandbox/jameswilliams/1228942 it gives me the error
Fatal error: Call to undefined function node() in D:\wamp\www\myproject\includes\form.inc on line 1460
Comment #33
alesr commentedWhat's the latest "news" about OG Invite members functionality for OG 7.x-2.x?
This feature is really missing and no dev branch didn't came close to a stable solution.
It's +1 for me to help developing it. I created an "OG Invite new" module based on Invite API http://drupal.org/project/invite
We should all join the powers and create THE solution for inviting members to og groups for OG 7.x-2.x
I'm on IRC #drupal-og
Comment #34
vasi1186 commentedHi alesr,
thx for your support! I am currently too much busy to continue with the development of this module, so if there is anyone that can take over the further development, that's perfect. There is a branch for d7 migration of this module: http://drupal.org/node/1082946/git-instructions/7.x-1.x but I am not sure how is the status of it. So, if you have time, fell free to check it and continue the development.
I am also on IRC, on #drupal, #drupal-i18n and #drupal-contribute
Vasi.
Comment #35
alesr commentedHere is a Drupal 7 version for OG Invite People.
Works with OG 7.x-2.x and doesn't need Invite module.
I needed a user created and invited to group when emailing him so I didn't used the Invite module.
Comment #36
4alldigital commentedI have downloaded the http://drupal.org/node/1082946/git-instructions/7.x-1.x version, and got a version finished, at least for my own purposes of inviting users to group via email (which creates a user account for them), but also added an "offline invite URL" to invite friends on Facebook or print a PDF with the invite URL on it to be shared and/or posted for an events site I have done.
I have not contributed or maintained any modules on Drupal.org before, but I friend says I should mention this to see if there's any interest in getting this up and running as a D7 module. advice on what to do next would help...