Hi,
I am developer of Ajax Register module. Some time ago I got an issue #1637368: Existing user can't login if changes occur with Legal module. After code review I found a bug: in legal_user_login() you should change drupal_goto() function to $edit['redirect']. It provides more carefully redirect for forms processed via ajax. This do not breaks any behavior but expands existing one. Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | legal-fix_redirect_on_hook_user_login-1644018-18.patch | 350 bytes | akkina |
| #16 | legal-fix_redirect_on_hook_user_login-1644018-16.patch | 468 bytes | ad4m |
| #11 | legal-Fix_redirec_on_hook_user_login-1644018-11.patch | 675 bytes | ad4m |
| #8 | 1644018-legal-redirect_drupal_goto_fix_with_query.patch | 788 bytes | id.tarzanych |
| legal-fix-redirect.patch | 558 bytes | spleshka |
Comments
Comment #1
Sk1Zy commentedAfter applying this patch the error message doesn't pop up and i get a "Login successful" window and then a redirect. However once the page has reloaded the user isn't logged in.
Comment #2
David Stosik commentedDoes not work for me either...
Comment #3
spleshkaDid you apply it to the dev release?
Comment #4
Asome commentedsame thing, once the page has reloaded the user isn't logged in.
with both versions, dev and not dev
Comment #5
geerlingguy commentedNote: It might be better to override
$_GET['destination']inside hook_user_login(); I haven't had much luck with$edit['redirect'].Comment #6
jarrodirwin commentedI am using the legal module in conjunction with ajax_register and neither the $edit['redirect'] or $_GET['destination'] solutions mentioned here have worked for me either.
More information (but not yet a real solution) can be found https://drupal.org/node/1651226
Comment #7
id.tarzanych commentedI am using Fancy login on the site, and this solution have worked for me.
Comment #8
id.tarzanych commentedUpdated patch, added destination to the link and fixed one-time-login redirect
Comment #9
id.tarzanych commentedComment #11
ad4m commentedHi,
I've encountered same issue when loging in users using ajax and legal had changed. Patch provided by @Spleshka worked for me, but I think it's not enough. Since legal module destroys user session, it must also set
$form_state['uid'] = 0;to let other module know that log in actually did not happen.I'm uploading a patch.
Comment #13
zeezhao commentedUsing fancy_login and patches in #8 and #11 above don't work for me i.e. user can't login when change to legal module. So user is not redirected to legal module to confirm change. Please has anyone got a fix for this? Thanks.
Comment #14
tasc#8 works for me with asaf & autodialog modules.
Comment #15
Dorayaki commentedFor those who still unable to be redirected could try this solution:
Replace:
drupal_goto('legal_accept/' . $signatory->uid . '/' . md5($signatory->name . $signatory->pass . $signatory->login), array('query' => $query));to:
$GLOBALS['destination'] = 'legal_accept/'. $signatory->uid . '/' . md5($signatory->name . $signatory->pass . $signatory->login);Comment #16
ad4m commented4 years later, module update and issues is still there... Here is patch updated to version 1.10.
Comment #18
akkina commentedI reformatted #16's patch and will attache it here.
Comment #19
web226 commentedThanks, the patch in #18 worked for me on Legal 7.x1.10
Comment #20
zhinio commentedHi,
I am using Bootstrap Login Modal and patch #18 didn't work for me. This is an awesome module and it would be nice if there is a solution for the modal logins.
Comment #21
avpadernoBugs are fixed in the development snapshot.
Comment #22
avpaderno