如何判断Magento用户是否是管理员? [英] How can I tell whether a Magento user is an administrator?

查看:56
本文介绍了如何判断Magento用户是否是管理员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Magento 1.5,并且需要检查当前登录的用户是否是管理员用户.我需要从用户端检查这一点,因为我需要根据成员是否是管理员用户来执行一个过程.

I'm using Magento 1.5, and I need to check whether the currently-logged-in user is an admin user. I need to check this from the user end, because I need to do a process for members that depends on whether they're admin users or not.

在Magento中这可能吗?

Is this possible in Magento?

推荐答案

Mage::getSingleton('admin/session')->getUser();

Mage::app()->getStore()->isAdmin();

这篇关于如何判断Magento用户是否是管理员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆