Sorry if this is something simple, but I'm baffled here. The comments for invite_form_alter say "the new mode is only allowed if no other module has overridden the menu access handler for the user registration form."
I did not make a note of it, but I don't think on initial install (and before I had done a run-through of the code) I had the "New user registration by invitation only" option in the user settings form. Which led me to install logintoboggan to try and achieve the redirect and login from the registration form.
This definitely alters the user_admin_settings form, so after going back to the code, I proceeded to uninstall logintoboggan, rebuild menus, etc. But I still see nothing of the form alters from invite. I am also not sure how to go about tracing any other modules which might be altering this form, though I don't suspect there are any.
First, is this a bug or did I just twist up the usage (and if so, how should I recover?)
And second, is this ideal behavior in terms of adding options to the form?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | invite-registration-form-error-1068328-2.patch | 1.17 KB | glekli |
Comments
Comment #1
idiotprayer commentedTo clarify, the check function below is returning false, which results in the proper invite callback not being added to the user/register menu alter.
Line 244 of invite.module
Comment #2
glekli commentedI found that the 'invitation only' option did not show in the user settings form because the form slightly changed in D7, and the id of the fieldset that encloses the 'Who can register accounts' option is now 'registration_cancellation'. The code still referred to it as 'registration', which is the id used in D6.
I also noticed that the 'invite_process' function had been renamed to 'invite_process_invite', but hook_user_insert still tried to call the old function. That resulted in a 'Call to undefined function' error when I set the registration settings to 'invitation only' and tried to register as an invitee.
I am attaching a patch to fix these. This patch assumes that the patch in http://drupal.org/node/1144862 has already been applied to the 7.x-2.x branch.
Comment #3
paul_constantine commentedI applied both patches you mentioned.
But still the Invite module does not work fully. It offers the option to set registration to "by invitation" in the account settings, it does send out invitations.
But when the invited person tries to register the page shows errors. And there is no button to proceed with the registration.
I did have the UR-invitation option enebled though.
Any ideas? Am I missing any other patches?
UPDATE -----------
Okay, I got it to work by disabling UR-Invite.
One problem remains though. Here it is.
Am I missing something here? This is annoying.
Comment #4
glekli commentedCommitted.