How to reproduce:
on loggintoboggan setup page:
1. Set password - on
2. Non-authenticated role - create new role on roles page and choose from list
3. Immediate login - on
After module setup:
1. Try to register new user (after registration you will be logged in).
2. View validation e-mail and follow validation link
3. Read drupal_set_message (You are logged as %username%)
And no validation at all. You can also try to turn off "Immediate login" and after registration (but before validation link) log in.
The reason for this is in function user_pass_reset (user.pages.inc). In the first lines there is a check:
if ($user->uid) {
...
And for this condition, there is no validation instructions.
Maybe logintoboggan have to remove ability for logging with pre-auth role?
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | logintoboggan-email-tokens-1381564-20.patch | 2.69 KB | stevecowie |
| #16 | logintoboggan-email-tokens-1381564-16.patch | 2.01 KB | makbul_khan8 |
| #12 | logintoboggan-email-tokens-1381564-12.patch | 2.05 KB | jon pugh |
Comments
Comment #1
Anonymous (not verified) commentedSame issue here.
validate link [current-user:validate-url] in the email gives a page not found.
Resent validate email in the user account gives a [current-user:validate-url] that works ok.
Comment #2
bdziewierz commentedSame problem. User currently logged in doesn't get validated.
Comment #3
bdziewierz commentedActually, I recall my last message - this works correctly. Use [user:validate-url] token and not [user:one-time-login-url] in your Welcome email template.
Comment #4
bdziewierz commented@cmseasy: Shouldn't it be [user:validate-url]?
Comment #5
stevecowie commentedHi
If I've understood your problem correctly, this is a matter of re-configuring the welcome, no approval needed email as mentioned on the LT configuration page:
"NOTE: If you enable this feature, you should edit the Welcome (no approval required) text. More help in writing the e-mail message can be found at LoginToboggan help."
Comment #6
guy_schneerson commentedI am evaluating the use of the module for a job and may have hit the same issue
if I allow immediate login and use a Non-authenticated role, when a user gets a validation email and clicks the url it doesn't work and the user has no authenticated role.
hope this helps i haven't spent to long looking at this so may have missed something about how the module operates.
Comment #7
makbul_khan8 commentedHi
Thanks bdziewierz,
You saved my lots of time by providing such an important token replacement.
use this:
[user:validate-url]instead of
[user:one-time-login-url]in your Welcome email template.
Comment #8
danoprey commentedSorry for being an idiot, but where do I put the [user:validate-url] token? I don't see a token UI and I've tried it in my welcome email, no luck.
Comment #9
makbul_khan8 commentedHi danoprey,
I am not sure but I think we get
[user:validate-url]token if we have logintoboggan module installed.we can use this token on admin/config/people/accounts/settings E-mail section tab and can also be used in custom code.
Thanks
Comment #10
stevecowie commentedmakbul_khan8 is correct. The Token is created by LT, and if you install token module you can browse available tokens.
Comment #11
jon pughThis is very poorly documented. I am going to create a patch that explains this more.
Comment #12
jon pughAttached.
Comment #13
Dave Cohen commented+1
Glad I found this thread. I was struggling to figure out why users couldn't get out of pre-authenticated state.
Comment #13.0
Dave Cohen commentedspell fix
Comment #14
dooug commentedComment #15
dooug commented@John Pugh, thanks for the patch. Though, It looks like it has some whitespace and other nit-picks than needs clean-up to meet coding standards.
Comment #16
makbul_khan8 commentedHi Douglas Reith,
Created clean patch for same, can you please review & merge.
Thanks
Comment #17
makbul_khan8 commentedComment #18
prasannag commentedComment #19
prasannag commentedHi Makbul, I have reviewed this patch and [user:validate-url] token works fine.
Comment #20
stevecowie commentedThe patch at #16 applies but I made two slight alterations. One was to delete the todo related to setting the email tab. As acknowledged in 16, it's not working and I think it's better to get this applied and solve that problem later. I also made a slight related change to the field for permitting immediate login to make it clearer that you should only use that setting when allowing visitors to register without admin approval.