@Magento 2
In order to restrict front side access for some admin user i need currently logged in admin user details at front side.
I have tried to get the admin session details as per below but not getting details.
Variable: protected $_adminSession;
Model: Magento\Backend\Model\Auth\Session $adminSession
Function: $this->_adminSession->hasUser() ? (int)$this->_adminSession->getUser()->getId() : null;
Above call gives me blank value.
If someone have idea regarding the same please share here.
Thanks in advance.