How can i get store id of the current user logged in admin in magento? I want to restrict custom module data by the type of user logged in admin area. I followed below link http://www.pixelpaul.net/magento-restrict-admin-order-website-store-view-certain-user-role/

I have also used Amasty Advanve permission but it doesn't work for custom module

  • For magento 2 or magento 1? – Chirag Patel Oct 11 '18 at 12:22
  • Have your try this code => $storeId = Mage::app()->getStore()->getStoreId();? It is return admin store id – Abdul Oct 11 '18 at 12:24
  • yes it gives me 0 which is incorrect – Arjun Oct 11 '18 at 12:25
  • Yes it is correct. Because admin store id is zero – Abdul Oct 11 '18 at 12:30
  • You want to get the storeId of current admin user in front of back ? – PЯINCƏ Oct 11 '18 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.