Radix Posted May 2, 2016 Report 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
Michael Posted May 2, 2016 Report Posted May 2, 2016 Yeah you can use: $this->parent->requireLogin(); activa 1 Quote
Blesta Addons Posted May 2, 2016 Report 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") Michael, activa and jobplease 3 Quote
Tyson Posted May 2, 2016 Report 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
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.