Magento: Detect if admin is logged in in frontend pages

后端 未结 12 605
轻奢々
轻奢々 2021-02-04 00:09

I have created a magento extension. I want to implement access to the extension. The extension creates a page in frontend and i want only admin to access that page. So basically

12条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 00:54

    Here is a solution this works with Magento 1.7.0.2 (tested) and on each frontend site, I use this in an controller not extending from Mage_Adminhtml_Controller_Action.

    https://peters-christoph.de/tutorials/magento-pruefe-admin-session-logi-im-frontend/

提交回复
热议问题