terminal42 / contao-autoregistration

Auto-login your Contao users after their registration or account activation.
MIT License
7 stars 7 forks source link

Fix authentication success handler by setting the _target_path #7

Closed richardhj closed 4 years ago

richardhj commented 4 years ago

The auto-login does not work in Contao 4.9 since the target path is missing in the request. Actually, the login is working, but the authentication success handler throws an error.

This fix sets the _target_path to the current request which inherits from the jumpTo defined in the module.

As you can see, I disabled the authentication success handler when jumpTo is null. Don't know if this is the best solution, but it will throw an error otherwise. Or can we set _target_path to an empty string?

aschempp commented 4 years ago

How abouqt just set the target page to the current URL?

richardhj commented 4 years ago

Just applied your feedback! The redirect will be handled by the registration module nonetheless. Will release a new version once approved, @aschempp!