Log message #4103177

# At Username Text
# Dec 13th 2017, 10:07 joopm you helped soo much
# Dec 13th 2017, 10:07 hmic ;-)
# Dec 13th 2017, 10:07 joopm i will ask you for lunch someway
# Dec 13th 2017, 10:07 joopm thank you this work like charm : $this->redirect($this->Auth->redirectUrl())
# Dec 13th 2017, 10:05 hmic like i showed
# Dec 13th 2017, 10:05 hmic so change the redirect to not be the referer gut the redirectUrl
# Dec 13th 2017, 10:04 joopm its show the desired url
# Dec 13th 2017, 10:04 hmic so just dont redirect to the referer, which makes no sense. but to auth redirectUrl
# Dec 13th 2017, 10:04 joopm Query string redirect / url
# Dec 13th 2017, 10:03 hmic it's $this->redirect($this->Auth->redirectUrl()) actually, not loginAction of course, sorry my fault.
# Dec 13th 2017, 10:03 joopm in the request i can see
# Dec 13th 2017, 10:02 hmic either you let the authcomponent redirect, or you have a custom redirect action based on whatever
# Dec 13th 2017, 10:02 hmic you can't have both
# Dec 13th 2017, 10:02 hmic ah, IC now - you do not redirect($this->referer()) this redirect($this->Auth->loginAction)
# Dec 13th 2017, 10:01 joopm thanks
# Dec 13th 2017, 10:01 joopm moment i check
# Dec 13th 2017, 10:01 joopm my login function is costume made because the redirect based on user role
# Dec 13th 2017, 10:01 hmic can you see the ?redirect=... get parameter added from the authcomponent at the login action?
# Dec 13th 2017, 10:00 joopm cakephp 3.4.4
# Dec 13th 2017, 09:59 joopm i can define also a specific page after redirect
# Dec 13th 2017, 09:59 joopm yes automatically do the auth compenent
# Dec 13th 2017, 09:57 hmic this has been added to the authcomponent some time ago
# Dec 13th 2017, 09:57 hmic which cakephp version?
# Dec 13th 2017, 09:57 hmic does the authcomponent do the redirect automatically?
# Dec 13th 2017, 09:57 joopm when its logged,and click the content of email immediatly redirect to the desired page
# Dec 13th 2017, 09:56 joopm i define the url,but because the user is not logged first he has to login
# Dec 13th 2017, 09:55 hmic joopm, after clicking the link in the mail and beeing redirected to the login page - from the authcomponent, not a custom action in your controller! - can you see the get parameters in the url ?redirect=....
# Dec 13th 2017, 09:54 joopm when i use $this->redirect($this->referer()); its "leave" on the login page
# Dec 13th 2017, 09:53 LubosR hmic, thanks. yes it makes sense :) v1 it is at this case for me :)
# Dec 13th 2017, 09:51 hmic the authcomponent can do that - and does automatically - since some time
# Dec 13th 2017, 09:51 hmic joopm, which cake version?
# Dec 13th 2017, 09:51 joopm so i send the exact link,but he need to login first,now i can not use the
# Dec 13th 2017, 09:51 dereuromark All works perfectly, email or no email
# Dec 13th 2017, 09:51 dereuromark I dont get it.. Check this out: http://sandbox.dereuromark.de/auth-sandbox/auth-sandbox/for-all => redirect back after login
# Dec 13th 2017, 09:50 joopm and no previous i send the exact link in email
# Dec 13th 2017, 09:50 dereuromark also there you can pass query strings in links in emails
# Dec 13th 2017, 09:50 joopm okey the scenerio is the user is "coming" from email
# Dec 13th 2017, 09:49 joopm my cake is 3.5
# Dec 13th 2017, 09:49 hmic LubosR, if you want to handle your try/catch blocks in the same way, you might want to use v2 everywhere. in this particular place, i'd not be afraid of using v1 though.
# Dec 13th 2017, 09:49 joopm hello dereuromark
# Dec 13th 2017, 09:48 dereuromark joopm: the framework should already do that for you, appending the redirect query string. what version are you on?