I want to get all information of user(admin) and I find this answer for M1:
To get an admin user role try (assuming that user is log in)
$admin_user_session = Mage::getSingleton('admin/session');
$adminuserId = $admin_user_session->getUser()->getUserId();
$role_data = Mage::getModel('admin/user')->load($adminuserId)->getRole()->getData();
Now I want get this for Magento 2.0. And how to do ?
Best Answer
You need to use DI in your class -
1. add property of AdminSession class to class 2. add including of the variable using dependensy injection:
and then where you need to use it: