Needs work
Project:
LoginToboggan
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2012 at 18:30 UTC
Updated:
17 Jun 2016 at 17:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
glekli commentedThanks for reporting. Did you validate that it is Invite that causes this error? Does this stop appearing when you disable Invite?
Comment #2
Dimetrius commentedYes, I tested it
It depends if invite activated or not, and issue happens when new user registers under invite link
Comment #3
Jessica A commentedI have the same error
Comment #4
TimelessDomain commentedI don't think this error is from invite, since i do not have this installed.
using
- profile2
- realname
- profile2 registration path
- logintoboggan
Comment #5
vankod commentedSame problem.
Comment #6
vankod commentedThis problem actual only if radiobutton "Invitees only" checked in "Who can register accounts?" section on http://mysite.any/admin/config/people/accounts page. It's activate, when site need to send "welcome message".
I'm not shure that it is LoginToboggan problem.
Comment #7
onefang commentedI can confirm this. Turn off "Invitees only" and there's no errors, with the validation email being properly filled instead of empty. With "Invitees only" turned on, the user gets the errors mentioned above when they accept the invite, and the validation email sent as the next step is blank.
Comment #8
klucid commentedI can confirm that it is a LoginToboggan issue. I just disabled the module and left the invitee only option activated. User registers with no problem.
Comment #9
onefang commentedSo the problem only happens when BOTH are turned on. The two modules don't get along. Should stop pointing the finger and try to get along. Could be that both are at fault.
Comment #10
burgs commentedThe issue is with LoginToboggan. In logintoboggan.module line 511 there is the presumption that no modules will alter the user settings form. It expects variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL) to be either USER_REGISTER_VISITORS or USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL and fails to initialize $mailkey if there is another value set for the user_register variable.
I think the following code needs to be in place at around line 525
Comment #11
klucid commentedThanks, Burgs. Have you had a chance to try this out?
Comment #12
awgh commentedBurgs has it almost 100% there, but my site is Invite-only with no admin confirmation required, so $mailkey is not even defined. To avoid an undefined variable error, the patch should use isset() instead of the C-style if($mailkey).
Not to take anything away from Burgs, the original patch saved me a really large amount of time during a busy week! Thank you Burgs!
Corrected fix below works awesome for me (logintoboggan.module around line 525):
Comment #13
burgs commentedThanks awgh,
If you want to create a patch from your changes, I will review them, and we can get it committed.
Comment #14
puddyglumThe drupal_set_message($message); can be moved outside the if statement, as it is set with a default value.
Attached a patch from #12 with the modification.
Comment #15
puddyglumYeah, so this is more complicated now. I saw it as a nicety that we could leave the site in "Invite Only" mode, and yet the Profile2 Registration Path module allows users to register even in "Invite Only" mode...
I think this problem really is a result of Registration Path not correctly handling the site-wide registration settings, or providing a workaround for it.
So even with this patch applied, I don't get an e-mail.
Comment #16
Taxoman commentedComment #17
astutonetHi.
I also have this issue.
I did a test by applying the patch in #14. The error message is no longer displayed. It's possible to view an e-mail confirmation message, but the e-mail with additional information is not sent.
I also did a test with the code provided in #12. The message of e-mail confirmation wasn't displayed, but an email was sent to the mailbox of the new user with a new link.
This new link, relates only to options for sending messages.
For the system to work, it was necessary to enable the option "Set password" in admin page of LoginToboggan.
After that, the guest user can access the site via the link in the confirmation email and enter your password to log in to the site.
I think this is the way temporarily.
Comment #18
Road Kill commented•Notice: Undefined variable: mailkey in logintoboggan_user_register_submit() (line 524 of /usr/www/users/shonghjazq/sites/all/modules/logintoboggan/logintoboggan.module).
•Notice: Undefined variable: text in _user_mail_text() (line 2770 of /usr/www/users/shonghjazq/modules/user/user.module).
•Notice: Undefined variable: text in _user_mail_text() (line 2770 of /usr/www/users/shonghjazq/modules/user/user.module).
•Unable to send e-mail. Contact the site administrator if the problem persists.
I have also encountered this problem but only after upgrading the core to 7.19. I have also tried the patch #14 on the 7.x-1.x-dev version which removes the error message but the email is then not being sent.
I also do not have the Invites module installed so this problem must be with Login Toboggan.
I have tried the #12 fix but I get the following error with no mails being sent.
Notice: Undefined variable: mailkey in logintoboggan_user_register_submit() (line 525 of /usr/www/users/shonghjazq/sites/all/modules/logintoboggan/logintoboggan.module).
Comment #19
szt commentedConfirm the bug.
I don't use Invite.
Maybe this is a conflict with the Profile2 module.
Same environment with #4.
With patch #14 there is no error message, but also no mail at all.
Comment #20
szt commentedRelated issue: #1615488: Conflict with Profile2 and Invite
Comment #21
Road Kill commentedHi Szt I can confirm that I am also using the Profile2 module and I think the problem coul aslo be Profile2 and Login Tobbogin not playing nicely together.
Comment #22
bassam commentedI'm using the module 7.x-2.1-beta2
I created a patch that removes the error message and logs the user in after the registration.
If the user registers without an invitation, it will display a notification that the registration is pending admin approval.
Comment #23
mr.andrey commentedSubscribing. Using patch in #14 with Invite 7.x-2.