Some times we want to get the current loggedin admin user details to process the data.so in magento we can get currently logged in admin user details.we can get currently logged in admin user id, firstname, lastname , username, email, by using the following code
<?php
$admin_user = Mage::getSingleton('admin/session')->getUser();
echo $admin_user->getUserId();
echo $admin_user->getFirstname();
echo $admin_user->getlastname();
echo $admin_user->getEmail();
echo $admin_user->getUsername();
?>
No comments:
Post a Comment