[Skip to main content](#vessel-content)

#   OnAfterUserUpdate is missing some information.

##

- **[RobinHoeven](/forum/user/58022-robinhoeven "View RobinHoeven's Profile")**
- [![RobinHoeven's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/58022-robinhoeven "View RobinHoeven's Profile") Topic Author
- [ Offline](/forum/user/58022-robinhoeven)

Less More

- Posts: 3
- Thank you received: 0
-
-

7 years 9 months ago [\#303339](#303339) by [RobinHoeven](/forum/user/58022-robinhoeven "View RobinHoeven's Profile")  *[OnAfterUserUpdate is missing some information.](/forum/31-development/896807-onafteruserupdate-is-missing-some-information#303339 "-- HikaShop version -- : HikaShop Business 4.0.0 &#91;1810011756&#93; -- Joomla version -- : Joomla! 3.9.2 Stable -- PHP version -- : 7.2.14 -- Browser(s) name and version -- : Google Chrome 71.0.3578.98 -- Error-message(debug-mod must be tuned on) -- : None  I'm trying to make a call to an API with the function &quot;OnAfterUserUpdate&quot;. So after a user is updated in Hikashop, it should send some data to an API. But the data I want to use, is not in the variable used in the function. I'm dumping the $element variable on the screen and this is what I get:  I'm expecting a &quot;Default Billing adres&quot; and also a &quot;Default Shipping adres&quot; but those are, as you can see, not in the $element variable.  Can someone help me with this?  Thanks in advance, Robin")* was created by *[RobinHoeven](/forum/user/58022-robinhoeven "View RobinHoeven's Profile")*

-- HikaShop version -- : HikaShop Business 4.0.0 [1810011756]
-- Joomla version -- : Joomla! 3.9.2 Stable
-- PHP version -- : 7.2.14
-- Browser(s) name and version -- : Google Chrome 71.0.3578.98
-- Error-message(debug-mod must be tuned on) -- : None

I'm trying to make a call to an API with the function "OnAfterUserUpdate". So after a user is updated in Hikashop, it should send some data to an API. But the data I want to use, is not in the variable used in the function. I'm dumping the $element variable on the screen and this is what I get:
Code:

stdClass Object ( [user_email] =&gt; test@test.com [user_partner_activated] =&gt; 0 [user_partner_email] =&gt; [user_params] =&gt; O:8:"stdClass":6:{s:15:"user_custom_fee";s:1:"0";s:20:"partner_fee_currency";s:1:"1";s:21:"user_partner_lead_fee";s:1:"0";s:24:"user_partner_percent_fee";s:1:"0";s:21:"user_partner_flat_fee";s:1:"0";s:22:"user_partner_click_fee";s:1:"0";} [user_id] =&gt; 1 )

I'm expecting a "Default Billing adres" and also a "Default Shipping adres" but those are, as you can see, not in the $element variable.

Can someone help me with this?

Thanks in advance,
Robin

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5NjgwNy1vbmFmdGVydXNlcnVwZGF0ZS1pcy1taXNzaW5nLXNvbWUtaW5mb3JtYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

7 years 9 months ago [\#303346](#303346) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[OnAfterUserUpdate is missing some information.](/forum/31-development/896807-onafteruserupdate-is-missing-some-information#303346 "-- HikaShop version -- : HikaShop Business 4.0.0 &#91;1810011756&#93; -- Joomla version -- : Joomla! 3.9.2 Stable -- PHP version -- : 7.2.14 -- Browser(s) name and version -- : Google Chrome 71.0.3578.98 -- Error-message(debug-mod must be tuned on) -- : None  I'm trying to make a call to an API with the function &quot;OnAfterUserUpdate&quot;. So after a user is updated in Hikashop, it should send some data to an API. But the data I want to use, is not in the variable used in the function. I'm dumping the $element variable on the screen and this is what I get:  I'm expecting a &quot;Default Billing adres&quot; and also a &quot;Default Shipping adres&quot; but those are, as you can see, not in the $element variable.  Can someone help me with this?  Thanks in advance, Robin")*

Hi,

Well, the onAfterUserUpdate trigger is called when the user is saved in the database, and thus it only contains the data to be saved in the hikashop_user table.
The default addresses are stored in hikashop_address.
If you want to be triggered for the addresses saving, you can use onAfterAddressUpdate.
Note also that you can check the data coming from the form in $_POST.
And you can also load the addresses from the database with a MySQL query if necessary.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5NjgwNy1vbmFmdGVydXNlcnVwZGF0ZS1pcy1taXNzaW5nLXNvbWUtaW5mb3JtYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.057 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
