Monthly Archives: February 2014
-
February 25, 2014
Here is a quick code to get the admin user’s data (id, name, username, email, password, etc).
By admin user, I mean the users that login through the admin panel and those who have access to the admin panel of Magento. The users can be administrator, or with some specific roles.$user = Mage::getSingleton('admin/session')->getData();
$userId = $user->getUser()->getUserId();
$userEmail = $user->getUser()->getEmail();
$userFirstname = $user->getUser()->getFirstname();
$userLastname = $user->getUser()->getLastname();
$userUsername = $user->getUser()->getUsername();
$userPassword = $user->getUser()->getPassword();
Hope this helps.Thanks.