Closed (fixed)
Project:
Login And Logout Redirect Per Role
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Feb 2020 at 00:07 UTC
Updated:
5 Mar 2020 at 12:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rithesh bk commentedcurrently working on it ......
Comment #3
dhirendra.mishra commentedLet me work on this
Comment #4
dhirendra.mishra commentedpls review the patch.
Comment #5
antonnaviHello all here!
Thank you for help, Dhiren Mishra (dhirendra.mishra) !
Move added logic into service file plz https://git.drupalcode.org/project/login_redirect_per_role/blob/8.x-1.x/...
All working logic should be located inside of service.
Comment #6
jvi commentedHi,
Thanks for the work and the patch but I'm still having same problem.
After create new account, received welcome message, accessed to one-time login link and pressed login,
still redirected destination was shown.
I checked if the patch file was successfully applied or not and I can see added few lines ($request = .... if ($request !=...).
I used drupal_set_message($request) to see the contents of $request. The below is the $request of my case.
POST /user/reset/8/1582160692/O6ajEtQi3zzPWRpA1XmfqoDeNbCVPEbvHuPQHJ5kTZA/login HTTP/1.1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Accept-Encoding: gzip, deflate, br Accept-Language: en-GB,en-US;q=0.9,en;q=0.8 Cache-Control: max-age=0 Connection: keep-alive Content-Length: 96 Content-Type: application/x-www-form-urlencoded Cookie: SESS49960de5880e8c687434170f6476605b=Nnx9r9MCdSLrJ0pBI9fbn2rMbiasb9rXkDbUCnBCiOc Expose: 80:80,8025:8025 Host: localhost:32123 Origin: http://localhost:32123 Referer: http://localhost:32123/user/reset/8 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: same-origin Sec-Fetch-User: ?1 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36 X-Php-Ob-Level: 1 Cookie: SESS49960de5880e8c687434170f6476605b=Nnx9r9MCdSLrJ0pBI9fbn2rMbiasb9rXkDbUCnBCiOc form_build_id=form-6AEfPnYQ_SIsbAQTCk40JSFr_3eNpVX3-76TfNZ-91s&form_id=user_pass_reset&op=Log+inAm I doing something wrong?
I also double checked by disabling the redirection and got proper password setting page after the one-time login.
I'm creating a new website with ddev drupal-composer environment (docker). Could this environment cause this problem?
Regards,
Comment #8
antonnaviModule 8.x-1.x (DEV) branch was updated.
jvi could you test this issue (using 8.x-1.x module version) once again plz.
Comment #9
antonnaviComment #10
jvi commentedHi Antonnavi,
Tried and confirmed it's working correctly with 8.x-1.x-dev version.
The redirection after one-time login was ignored and I could set the password.
Thanks a lot.
By the way, what does "ALLOW DESTINATION" checkbox config do? I could not see any difference.
Regards,
Comment #11
antonnaviWhen "Allow destination" checkbox is checked module checks if current page already has "destination" (GET parameter like:
http://site.url/some-page?destination=/node/10) user will be redirected to it (in case from example redirect to/node/10page instead of URL that was set on module configuration page).Comment #12
antonnavi