mybb / mybb2

The repository for the MyBB 2 forum software. Not to be used on live boards.
https://www.mybb.com
BSD 3-Clause "New" or "Revised" License
109 stars 45 forks source link

Fix missing initialization on CheckAccess middleware #62

Closed JN-Jones closed 9 years ago

JN-Jones commented 9 years ago

As we set the language and some other variables in the Controller::__construct method which isn't run when a middleware returns a redirect/view some things are missing (wrong language, missing avatar etc). This PR fixes this by copying the code, however we should look whether we can add a init function somewhere which is run as soon as possible.

euantorano commented 9 years ago

Yep, looks good to me. I'll merge. Can you open an issue for the init() issue?