2

Anybody got any suggestions on debugging autoLoginAfterAccountActivation and activateAccountSuccessPath not working?

These are set in general.php of my config but when a user activates their account (sets their password) they are redirected to the homepage and not logged in. The user is showing as active in the control panel.

Hayelp!

Hayelp! http://www.cartoonscrapbook.com/01pics-L/penelope-pitstop_L20.jpg

3

(Not necessarily a great answer to your question, but it's in the same wheelhouse and might be handy if you're working in this area)!

I remember having issues with this myself (to be honest the precise details are a bit lost in time for me - but basically IIRC it's by design that they're not logged in after creation, perhaps to force them to practise login/their password? I can't remember but do remember I found it odd behavour) - anyway in my case the issues arose as part of adding user registration during commerce checkout. It was discussed on Slack and the solution was that Steve Rowling made a very handy plugin to auto-login newly created users: https://github.com/steverowling/autologin

I'm using it, works a treat.

(I should also wrap up my code for registration during checkout as a plugin and release that one of these days!)

  • Okay, so further to this have been able to login with Steve Rowling's excellent plugin. However can't seem to specify where a user is directed to on login. For example via the postLoginRedirect or activateAccountSuccessPath config. Any suggestions appreciated! – Cole Henley Sep 2 '16 at 13:02
  • hmmm I think activateAccountSuccessPath should work to be honest - what does your config look like - when we have new users register, they definitely go to their dashboard, so it's working here (this is for new user registration right?) – Jeremy Daalder Sep 3 '16 at 2:38
  • Hey Jeremy - the setting is 'activateAccountSuccessPath' => 'account', but (new) user registrations are still being sent to the site root. Ta – Cole Henley Sep 5 '16 at 8:20
1

Add 'autoLoginAfterAccountActivation' => true to config/general.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.