$admin = Mage::getSingleton('admin/session')->getUser(); if($admin){ return $admin->getId(); } 注意,只在后台相应的类中有效,前台经测试无法获得。