Magento Forum

   
Mage_Admin_Model_Mysql4_User override
 
frenske
Jr. Member
 
Total Posts:  7
Joined:  2008-08-13
 

How can I override the Mage_Admin_Model_Mysql4_User class with my own custom class?

I have added this section into the app/etc/local.xml file:

<models>
      <
admin>
            <
rewrite>
                 <
mysql4_user>Custom_Admin_Model_Mysql4_User</mysql4_user>
            </
rewrite>
      </
admin>
</
models>

Could anyone tell me how I can override this class correctly?

 
Magento Community Magento Community
Magento Community
Magento Community
 
vianetz
Guru
 
Avatar
Total Posts:  537
Joined:  2008-04-13
Munich, Germany
 

Please make use of the search function in this forum.

E.g. http://www.magentocommerce.com/boards/viewthread/14103/

 
Magento Community Magento Community
Magento Community
Magento Community
 
frenske
Jr. Member
 
Total Posts:  7
Joined:  2008-08-13
 

Thanx, but I’ve already searched this forum of cource, and I’ve also read that topic.

I have changed some things on my local.xml, see the xml below:

<modules>
            <
custom_admin_model_mysql4_user>
                    <
active>true</active>
                    <
codePool>local</codePool>
            </
custom_admin_model_mysql4_user>         
        </
modules>  

        <
models>

          <
user_entity>
            <
rewrite>
              <
mysql4_user>Custom_Admin_Model_Mysql4_User</mysql4_user>
            </
rewrite>          
          </
user_entity>
          
        </
models>

Magento doesn’t load my own custom class. I suspect the problem lies in the “mysql4_user” tag, could you tell me the correct tag?

 
Magento Community Magento Community
Magento Community
Magento Community
 
frenske
Jr. Member
 
Total Posts:  7
Joined:  2008-08-13
 

The sollution is this:

<admin_mysql4>
<rewrite>
<user>Custom_Admin_Model_Mysql4_User</user>
</rewrite>
</admin_mysql4>
[\code]

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top