therecluse26 / PHP-Login

A login system built with PHP, MySQL, jQuery and Bootstrap
MIT License
836 stars 442 forks source link

Add phplogin_menu.php as fallback menu #166

Closed daniel-falk closed 6 years ago

daniel-falk commented 6 years ago

I realized a flaw in my last menu-commit, the custom menu will not be displayed when you're at a settings page. This patch always tries to include a file named "phplogin_menu.php". I'm not super satisfied with the solution - any other ideas?

Allow either override by defining $barmenu as array or try to include the phplogin_menu.php file which should define the menu array. If no such file don't show anything in the menu bar.

therecluse26 commented 6 years ago

Hey @daniel-falk sorry about running behind on these, it's been a really busy couple of weeks. I think it's a pretty decent solution. We are running into an a small error though for some reason on some page loads with an undefined $barmenu variable in pagehead.php. I'm tweaking that as well as doing some other small tweaks (I like the idea of moving that phplogin_menu.php file into the same partials folder as where nav.php is. I'm also just renaming it barmenu.php to make it more recognizable). The partials folder I was thinking would have files that are meant to be more user-editable (though now I realize there are two files in there that shouldn't be in there, so I'll have to move them to a more logical location too.

Also, I just noticed that the config page has an error in it (it looks like maybe the token_validity setting was just inserted wrong in the installer), so I'll patch that up too.

therecluse26 commented 6 years ago

Ok, I got those sorted out @daniel-falk , I think it should be good now