How to check admin user is login in Magento 2?

You can check the Admin user is login or not using Magento 2 with Backend Session class.

Full path:
Magento\Backend\Model\Auth\Session

You need to create an injectable class in the __construct() method to check the admin user is login.

The output will be boolean based on the user login status.

Leave a Reply