How can i get the admin session in frontend.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$adminSession = $objectManager->create('Magento\Security\Model\AdminSessionsManager');
print_r($adminSession->getCurrentSession()->getStatus());
I tried with above script but no luck
Best Answer
and then call
Note: don't use
objectManager
. Its not proper way to do it in Magento 2