Closed (fixed)
Project:
phpBB Forum Integration
Version:
6.x-1.04
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2008 at 12:56 UTC
Updated:
9 Jan 2012 at 05:48 UTC
Hi all!
I'm using login toboggan on drupal 6.x and have been experiencing problems with "immediate login" option, it doesn't work properly.
I've been diving the code and I think I've found the problem, on logintoboggan.module, line 387 is written:
// Log the user in if they created the account and immediate login is enabled.
if($reg_pass_set && variable_get('logintoboggan_immediate_login_on_register', TRUE)) {
$form_state['redirect'] = logintoboggan_process_login($account, $redirect);
}
And I think it should look like:
// Log the user in if they created the account and immediate login is enabled.
if($reg_pass_set && variable_get('logintoboggan_immediate_login_on_register', TRUE)) {
$auth=array('name' => $account->name, 'pass' => $account->password);
user_authenticate($auth);
$form_state['redirect'] = logintoboggan_process_login($account, $redirect);
}
Please, advise if I'm wrong.
Comments
Comment #1
hunmonk commentedi highly doubt this is broken, or many more people would have reported it. i've also tested locally and have no issues. most likely you don't have the 'Set password' option enabled. you can't have automatic login if the user isn't creating their own password.
Comment #2
manuprevention commentedI know it's strange nobody else reported it, so I think I must be mistaken...
In my case, the set password option is enabled, and the redirecting option after registering is set too.
So if I set the redirection page to 'node/123456' i.e. a node that doesn't exist, after submiting, the system redirects to 404 and the login toboggan block says you're logged in, but if you click another link, drupal deletes your session.
If I set redirection page to a node that actually exists, after submitting, the user is redirected to front page and login toboggan block says you're logged out.
I'm using several contributed modules and maybe I have some incompatibility issues... Anyway, the patch solved my problem... and It should be easy to re-apply it in future revisions... but I'd rather like to know where is the error.
Thanks!
Comment #3
hunmonk commentednot convinced this is an LT bug. i'd recommend disabling all your other contrib modules to see if that corrects the issue, if so, then you should be able to track the compatibility issue from there...
Comment #4
manuprevention commentedIt is an incompatibility issue, the offendant module is phpbbforum 6.x-1.04, it uses a hidden block to log into phpbb and I think it might be messing with hook_user()
Perhaps this is a phpbbforum issue, please tell me if I should post it there.
Comment #5
hunmonk commentedmoving to the correct queue
Comment #6
Liquidream commentedHaving the same problem. When users click on the "One time login", it does NOT log them into the Drupal site. Instead, they are just taken to home page.
Any ideas??? :-(
Comment #7
vb commentedI think I have just fixed this.
in phpbbforum.module, in function phpbbforum_user
after lines
insert
Please try and give me feedback.
Comment #8
Liquidream commentedHi,
Sorry, I just tried your "fix", but it didn't work. It still kicks the user to the login/home page.
Note: I am using phpBBforum v6.x-1.04.
Comment #9
vb commentedShould work. I have corrected the empty edit array which hunmonk in LT give me upon registering before calling hook user.
I am using already phpbbforum-2.0-alpha5 and LT works with this patch, but it should not be matter which ver you are using.
Check your registration and LT settings (Set password).
Comment #10
Liquidream commentedHi,
Seems to be working now... Pretty sure this was my fault. Bad settings conflicting! :o)
Comment #11
fizk commented