0

I'm currently using Magento 1.7! In the Admin Panel under System-->Permissions-->Users

I want to alter data inside the User Info tab once I click Save User.

From what I know about Magento:

app/code/local/Mage/Adminhtml/controllers/Permissions/UserController.php

This should be the file path, to change if I want to do extra stuff with the params passed in. However inside this controller even if I put die() inside the functions they are never reached. Is it possible an extension overrode it? The only extension that I use that I can think of would be:

https://amasty.com/sales-reps-and-dealers.html

Is there a way I can check when the Admin User is submitted through "Save User" where it is sent to?

The extension Sales-Reps and Dealers has :

<admin_user_save_after>
          <observers>
               <amperm>
                    <type>singleton</type>
                    <class>amperm/observer</class>
                    <method>handleAdminUserSaveAfter</method>
               </amperm>
          </observers>
</admin_user_save_after>

Would that interfere with it?

I already added custom fields to Magento's create permissions User in the form and I'm trying to change the custom params in the controller to do specific things but I can't find which controller it's going to.

2

The file path you have specified should be correct, however altering Magento core by coping it to local code pool and altering there is not recommended. At this point I am not sure what are you trying to alter, but maybe following helps:

If you are trying to change what is save, you should look for related model and proper event it dispatches. Most likely this is admin_user_save_before.

If you are trying to change what is displayed in this tab, you can either create new theme for admin,and adjust layout, or rewrite the responsible block. Additionally, Mage_Adminhtml_Block_Permissions_User also dispatches permissions_user_html_before which may be used, depending on what you are trying to achieve.

  • Thanks for responding, I will update the question with more information. – CodingMageSheen Dec 16 '16 at 20:02
  • The main reason for my question is I change the local file like I listed above and the core file (for testing, I change it back) but neither effect the controller and I don't have any other ones I've built so it must be an extension? I want to know HOW i can find where it is going to, is that possible? – CodingMageSheen Dec 16 '16 at 20:21
  • I got it working but in a bad way. If I make changes to the mage file it works but if I make a mirror directory inside local it doesn't work. So i'll prob just create an event listener like you suggested – CodingMageSheen Dec 16 '16 at 20:46
  • If it doesn't work in local code pool, than it is definitely rewritten. Although I do not see any automated tool for this, controllers are not auto loaded classes, which means that whoever rewrote it, had to include it manually, so you can search your custom code for include of original file. See how it is done and what to search here – Stjepan Dec 17 '16 at 8:46

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.