Radix Posted May 2, 2016 Report Share Posted May 2, 2016 Hi, Is there a way to check in blesta if admin is logged in or client. Means if an admin is logged in only admin stuff would be called and displayed and not the user. But when we login as a client we can only see client stuff. Just asking for an idea. Quote Link to comment Share on other sites More sharing options...
Michael Posted May 2, 2016 Report Share Posted May 2, 2016 Yeah you can use: $this->parent->requireLogin(); activa 1 Quote Link to comment Share on other sites More sharing options...
Blesta Addons Posted May 2, 2016 Report Share Posted May 2, 2016 to see if admin logged : $this->Session->read("blesta_staff_id") to see if client is logged $this->Session->read("blesta_client_id") jobplease, activa and Michael 3 Quote Link to comment Share on other sites More sharing options...
Tyson Posted May 2, 2016 Report Share Posted May 2, 2016 It would be useful to have some context on when and where you want to check a user's logged-in status. The posts above assume you're doing it from a controller that extends AppController. 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.