BillP Posted April 13, 2014 Report Share Posted April 13, 2014 Having created a plugin using the developer documentation (http://docs.blesta.com/display/dev/Plugins) that creates new pages in the client area, I notice that I am able to browse those pages without being logged in as a client. How do I make them protected by the auth component? Thanks for your help. Flynnnan 1 Quote Link to comment Share on other sites More sharing options...
Michael Posted April 13, 2014 Report Share Posted April 13, 2014 Personally I'd use: if ($this->Html->ifSet($logged_in)) { }else{ } Quote Link to comment Share on other sites More sharing options...
BillP Posted April 14, 2014 Author Report Share Posted April 14, 2014 Personally I'd use: if ($this->Html->ifSet($logged_in)) { }else{ } Thanks Mike I put: // Not logged in? if (!$this->Html->ifSet($logged_in)) { // Send user to Login $this->requireLogin(); } at the top of appropriate methods in each controller. Works fine. Michael 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.