0

I have created a user and given some admin role permissions, i want to get this user details like phone number etc, how can i get this?

$roles_users = Mage::getResourceModel('admin/roles_user_collection');
        foreach($roles_users as $roleuser):
          $user = Mage::getModel('admin/user')->load($roleuser->getUserId());
          $role_data = Mage::getModel('admin/user')->load($user->getUserId())->getRole()->getData();//print_r($role_data["role_name"]);die;

          if ($role_data["role_name"]=="callcentre"){
            echo '<br/>User : '.$user->getUserId()."|".$role_data["role_id"]."|".$user->getUsername()." | ".$user->getFirstname()."|".$role_data["role_name"]."|";
          }
        endforeach;
  • We will need to know how you added these new fields to the admin user model. Normally they should be loaded when the object is loaded but without knowing how they are added I am not sure someone will be able to help you here. – David Manners Aug 25 '15 at 8:22
  • Correct i haven't added this fields yet, is it possible to add phone number in it? – Naveenbos Aug 25 '15 at 8:26
  • Yes i have created a phone number field in the admin user form, then how can i get the phone number from there? – Naveenbos Aug 25 '15 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.