Great module, I have been looking for a Registration Code feature for a while and only found this module today.
My website is currently invite only, using the invite module. Id also like users to be able to signup if they have a registration code. This doesnt seem possible as the invite module creates a new user setting "New user registration by invitation only." on admin/user/settings that interferes with both of these modules working together.
Is there anyway to use both of these modules? Invite is great so users can individually send invites to their friends email addresses, but I need the regcode functionality so I users can send out an invite code instead of needing to know the email addresses of people who they want to invite.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | regcode_url.zip | 810 bytes | toemaz |
| #16 | regcode_url.zip | 787 bytes | toemaz |
Comments
Comment #1
j0k3z commentedThe only way I can see this working is if the code generated by the INVITE module also acts as a Registration Code that works 1 time.
Then I could mark the Registration Code required when a user signs up and then change my websites signup settings to "Visitors can create accounts and no administrator approval is required."
Tthen I can give out a Registration Code that is good for 500 signups and not need everyones individual email address. The first 500 people to use this code on the signup page become members. Then these members can use the INVITE module to invite their friends via email addresses. Currently the invite modules send a registration link that looks like "example.com/invite/accept/ymcNNMLz" - so if that invite code also worked as a 1 time use RegCode and prefilled the register form everything would work perfectly.
Does this make sense? Is there an easier way?
Comment #2
aidanlis commentedHi,
You'll need a custom module to do this: quite a simple module to check whether there's an invite code, and if there is, hide the regcode fields.
I don't have time for this at the moment, maybe put down a bounty and someone can write it for you.
Cheers,
Comment #3
j0k3z commentedI have no experience coding modules, can you give me an idea about where I should start looking to add this feature? Is there a function or something that would get me started?
Comment #4
aidanlis commentedUnfortunately there's quite a steep learning curve writing modules, you'll need to read the introduction to module development and hook_form_alter.
Comment #5
j0k3z commentedIf anyone thinks they can hack this together then please let me know
Comment #6
aidanlis commentedIf you make a donation I'll move it up my very long list of things to do :)
Comment #7
Avaz Mano commentedsubscribing
Comment #8
Ela commentedsubscribing
Comment #9
j0k3z commentedSo it looks like a few other people are interested in this feature as well.
Is anyone willing to throw in some cash to help bump this up higher on aidanlis list of things to do?
Comment #10
aidanlis commentedComment #11
drjonez commentedHaven't seen a lot of activity with this module. i've had it installed for a while. Nobody seams to eager to update it for this type of functionality, you may wanna check out the Registration Code module.
EDIT: Please strike the previous comment, i'm an idiot.
Anyway, subscribing
Comment #12
Ela commentedI'm a bit confused.. this is the Registration Code module... Or is there another one?
Comment #13
drjonez commentedugh meant to reply in a different thread. sorry for the confusion
Comment #14
toemaz commentedJust to let you know, I'm on this.
Comment #15
aidanlis commentedSounds good toemaz, if you need any help drop me a line on IRC.
Comment #16
toemaz commentedFind attached a contrib module for the regcode module, which does one thing: look for the code in the url user/register/code/[code]. If it finds the [code], it injects the code in the textfield. Feel free to adapt the code to your own needs.
Comment #17
toemaz commentedSmall fix.
Comment #18
aidanlis commentedI don't think toemaz's module helps people trying to integrate with invite, but I agree it's a useful feature so I'll add it to core.
Comment #19
aidanlis commentedI think the best way to fix this issue is a contributed module to allow users to email regcode invitations to their friends. This module could be implemented either in regcode (thus replacing the Invite module altogether) or in the Invite module as an addon for compatibility (the preferred solution, as mailing invitations is what the invite module does best).
I don't have time to implement such a request, so I'll leave this open for discussion.
Comment #20
aidanlis commentedComment #21
aidanlis commentedComment #22
mjut commentedI need to use both modules as well. Invite and Registration Code.
My approach is alternating the "invite.module". In that file you ll find the section
If you placed
between:
and:
the registration-code field will be deactivated.
Unfortunately, the field will be deactivated by directly visiting ../user/register too.
There must be a way to placing "unset($form['regcode']);" affecting the registartion form by coming from an invite-code only?
I know, my code must be hilarious - but I think this is the best way to explain my plan. Maybe there is someone who can help getting this to work?
Thanks
Stephan
Comment #23
mjut commentedI got some results. Both modules are working together if you:
1. In /admin/user/invite/settings you need to change the path to registration page to user/register/invite
2. add following code in the file invite.module just under
function invite_form_alter(&$form, $form_state, $form_id) {
Now, if you are visiting the page /user/register you will see the field for the Reg-Code.
If a user gets and invitation, the user will be redirected to user/register/invite where the Reg-Code field is disabled.
Thats it. But it is just an idea. Maybe that is a starting-point to make something better.
Because there is on big issue:
Anybody can visit user/register/invite without having an invite. As there is no Reg-Code Field anyone will be able to register. (I think so?)
What do you think about this workaround? Is there a way to make this bullet-proof?
Of course, this attempt is really bad - especially as I am messing with the code in the invite module !!!!!
Comment #24
iex commentedSubscribing
Comment #25
davito18 commentedSubscribing