Not working with Login Toboggan
Rob_Feature - November 12, 2007 - 15:41
| Project: | Registration role |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Benjamin Melançon |
| Status: | by design |
Jump to:
Description
I can only assume it's because I'm using Login Toboggan (since everything else is pretty standard and there are no other bug reports on this module) but it flat-out doesn't work.
I have registration_role running, and I choose which role should be assigned at registration, but it just doesn't work. That role is not assigned. There are no errors in the log, so I'm not sure what more I can share. Was this module tested with Login Toboggan in the past?

#1
Heh, you are absolutely right.
I've been using it with LoginToboggan and it's not doing a darn thing!
Specifically, it doesn't work when you have "immediate login" enabled. (Granted, this is Login Toboggan's main feature.) Whatever Login Toboggan does to strip users of the "authenticated user" role so they only have the pre-authenticated role must also strip what Registration role adds.
For your use case you want the role assigned immediately, and not once the user is authenticated, right?
It'll be a week at least before I can get to this, sorry. It may be sort of complicated for a very simple module. Login Toboggan doesn't seem to set a custom weight, so that takes away a possible easy fix.
#2
Well, I'm glad I'm not just a dummy :)
I can wait a week....it would be awesome if you could roll out a fix for this and notify us here. Thanks for your work!
#3
Hi, I just stumbled into the same issue and seem to have solved it by a quite dirty hack:
Change the logintoboggan.modul line 257
$roles = ($reg_pass_set && ($validating_id > 2)) ? array($validating_id => 1) : array();
to
$roles = ($reg_pass_set && ($validating_id > 2)) ? array($validating_id => 1) : array(variable_get('registration_role_roles', '') => 1);
I do not believe it works with "immediate login" and something prettier can be made, but it did it for me.
#4
Thanks....Immediate Login will be the stickler for me, that's the main reason I use Login Tobaggan. So, I'm going to sit back and wait, and hopefully Benjamin will have a new version of the module with a fix for this next week....
Any progress on that Benjamin? Wondering if I need to think about an alternate solution or not, since I'm having a client wait on a fix for this. Let me know what you think...
Thanks again for the great module!
#5
Duh....
Somehow it never occurred to me. Login Toboggan already does role assignment on registration. So, I don't see a need to alter this module to work with login toboggan.
So, I'm going to mark this "by design" since it would be an unnecessary duplication of functionality.
#6
Yes, LT assigns a role on registration, but it's meant to be temporary. After the new user confirms by clicking on the link in their confirmation email, LT reverts their status to Authenticated User and loses the Role assigned by Registration Role. There is a workflow issue here that needs to be resolved, either by LT or by Registration Role maintainers.