contao / docs-archive

Contao Documentation
https://docs.contao.org/
Other
42 stars 76 forks source link

fix postLogin and postLogout hooks #349

Closed fiedsch closed 8 years ago

fiedsch commented 8 years ago

both hooks apply to backend and front end users as they are triggered in the User class that both FrontendUserand BackendUser are derived from.

Toflar commented 8 years ago

Good find! I think rather than checking for TL_MODE == 'FE' you should check for $user instanceof \FrontendUser :) We should discourage using constants wherever we can :)

fiedsch commented 8 years ago

Thanks for the comment, Yanick. I updated the PR.

I came across the problem by https://community.contao.org/de/showthread.php?60122-postLogin-BackendUser-given&p=391129

Toflar commented 8 years ago

:+1:

fiedsch commented 8 years ago

Thanks for carefull reading. Hope to create a PR without issues of that kind sometime soon. The PR is updated.

aschempp commented 8 years ago

No problem at all! That's the power of open source, multiple people can contribute for the best result :-)