My name is Vasi CHINDRIS and I am a Drupal developer for about 3 years. I recently developed a drupal module that is capable of sending invitations for organic groups via a mail. The idea of the module is to send hashed links (like the ones sent when the user has to confirm the account) and when the user will access those links he will be automatically logged in and subscribed into the group.
The idea of the module came to me when I developed an application where the users could invite other users to join their groups, but the links from the mail were something like: og/subscribe/node_id. Now, if the user that got the mail was not already logged in, he would get an access denied, or redirected to the user login page, then he had to login, and the he became a member of the group. This module skips the login process and subscribes the user automatically based on the special token from the link. So this module improves the usability of the subscribing process in the applications where organic groups are used.
The hashed link looks something like: group/node_id/join/user_id/1b110493dd0152f927d2883a1ba23f69 and the invitations can be sent from a url like: og/users/node_id/invite_user and it is shown as a tab near the "List" and "Add Members" tabs for an organic group.
Comment | File | Size | Author |
---|---|---|---|
#1 | og_invite_link.zip | 6.71 KB | vasi1186 |
Comments
Comment #1
vasi1186 CreditAttribution: vasi1186 commentedI attached the drupal 6 version of the module.
Comment #3
arianek CreditAttribution: arianek commentedHi. Please read all the following and the links provided as this is very important information about your CVS Application:
Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications
Comment #4
apadernoComment #5
vasi1186 CreditAttribution: vasi1186 commentedI created the experimental project for this module here: http://drupal.org/sandbox/vasi/1082946
I also pushed on git a first version of the module that can be reviewed.
Vasi.
Comment #6
a.ross CreditAttribution: a.ross commentedYour code follows the coding standards relatively well. There are three exceptions I've spotted: control structures (a space before the opening curly brace), string concatenation (spaces before and after the concatenation operator) and spaces between commas, as in:
array(1,3,4)
, which should bearray(1, 3, 4)
.Besides that, you seem to have a fairly good understanding of the Drupal API. I would only advise you not to make your lines exceed 80 chars too often.
Comment #7
vasi1186 CreditAttribution: vasi1186 commentedHi,
thank you for your fast reply! I pushed into git the coding standards changes that you reported. I didn't change anything else. I will also consider your advice to not exceed more than 80 chars in my code lines too often.
Comment #8
a.ross CreditAttribution: a.ross commentedI'm sorry, I should have pointed you to the Code review module in the first place. This module will parse your code and will give you a lot of tips, especially regarding coding standards in Drupal. There are still ~50 warnings, mostly trailing spaces and still indentation.
Additionally, I have tested your module and it appears to work. I don't have experience with Organic Groups though, so maybe it's best if you ask someone in IRC #drupal-contribute who does have experience with OG to more thoroughly review your work.
Comment #9
a.ross CreditAttribution: a.ross commentedBut first you should correct those 50 warnings. Mind you, that if coder tells you about the CVS $Id$ tag, you should ignore that. The ID tag is not needed in GIT.
Comment #10
vasi1186 CreditAttribution: vasi1186 commentedI made a new push after inspecting the module files with the coder module.
Regarding the testing, I will also try to find some people that are willing to do that.
Comment #11
sreynen CreditAttribution: sreynen commentedThe sandbox project seems to be a full project now, so I'm changing the status:
http://drupal.org/project/og_invite_link
It would be good to add documentation of what happened to this issue.
Comment #12
vasi1186 CreditAttribution: vasi1186 commentedok, where should I write that documentation?
Comment #13
sreynen CreditAttribution: sreynen commented@vasi1186, if you know how that sandbox project became a full project, I'd suggest documenting it in a comment here, so anyone looking back at this issue will know how it got fixed.
Comment #14
vasi1186 CreditAttribution: vasi1186 commentedSo, in the beginning, I created a sandbox project where I exposed the idea and uploaded a first version of the module for testing. I must say that during the testing and after receiving some feedback from the community, there were quite a lot of changes in the code. Special thanks to Mike (http://drupal.org/user/107190), he took care of making the sandbox project a full project (maybe he can describe more about the steps he did). So, in the end, the process was not so complicated: applying with a sandbox project, making some activity (some commits, ask interested people to test the module and give feedback, and so on), getting a full project, release some development snapshots and in the end a stable version.
Comment #16
apadernoComment #17
apaderno