Whenever a new customer is created or modified, I want to add a new custom attribute into that customer.
I've created a customer observer but I'm obviously getting an infinite loop. When updating the customer, the observer is called and the new attribute is saved so the observer is called again and again...
These are my observers:
<events>
<customer_save_after>
<observers>
<mycompany_customer_observer>
<type>singleton</type>
<class>mycompany_customer/observer</class>
<method>addVisa</method>
</mycompany_customer_observer>
</observers>
</customer_save_after>
<customer_register_success>
<observers>
<mycompany_customer_observer>
<type>singleton</type>
<class>mycompany_customer/observer</class>
<method>addVisa</method>
</mycompany_customer_observer>
</observers>
</customer_register_success>
</events>
How can I store a new attribute in the customer whenever it's created or updated?