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

#   Pass address to the $data upon user registration

##

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

Less More

- Posts: 59
- Thank you received: 2
-
-

5 years 10 months ago [\#328440](#328440) by [allbs](/forum/user/40031-allbs "View allbs's Profile")  *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328440 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")* was created by *[allbs](/forum/user/40031-allbs "View allbs's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.4.13
-- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION_SUBJECT

Hi, is it possible to pass the user Address the costumer created upon registration on the website?

I Print_r the $data variable but it doesn't contain the user address.
example below

[ ![uadd.PNG](/forum/attachment/51685) ](/forum/attachment/51685 "uadd.PNG")

[ ![uadd2.PNG](/forum/attachment/51686) ](/forum/attachment/51686 "uadd2.PNG")

thank you

- [ ![uadd.PNG](/forum/attachment/51685) ](/forum/attachment/51685 "uadd.PNG") [ ](/forum/attachment/51685?download=1 "uadd.PNG")
- [ ![uadd2.PNG](/forum/attachment/51686) ](/forum/attachment/51686 "uadd2.PNG") [ ](/forum/attachment/51686?download=1 "uadd2.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy85MDE2OTgtcGFzcy1hZGRyZXNzLXRvLXRoZS1kYXRhLXVwb24tdXNlci1yZWdpc3RyYXRpb24/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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

5 years 10 months ago [\#328457](#328457) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328457 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")*

Hi,

What you say is strange.
It's been several years now that the address data from the registration form is passed in the $data object.
It's done with the code: Code:

$mailClass = hikashop_get('class.mail'); $registerData-&gt;user_data =&amp; $userData; $registerData-&gt;address_data =&amp; $addressData; $registerData-&gt;shipping_address_data =&amp; $shippingAddressData; $registerData-&gt;active = $useractivation;

in the file administrator/components/com_hikashop/classes/user.php
It's this $registerData which is given to the email notification when loading it with the line:
$mail = $mailClass-&gt;get('user_account', $registerData);
So I don't see how you can print_r an object with user_data and active but without address_data and shipping_address_data in the email.
I suppose I'm missing some information about what you're trying to do where...

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

5 years 10 months ago [\#328472](#328472) by [allbs](/forum/user/40031-allbs "View allbs's Profile")  Replied by *[allbs](/forum/user/40031-allbs "View allbs's Profile")* on topic *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328472 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")*

Hi nicolas, thanks for the reply.

I edit that file and it was as you showed, but it seams to have no effect on the email.
i even comment those lines and had the same result on the email. with the same information on the $data var, and (at least i did't find any) overwrite of that file.

also if I activate that administration email, the admin is not receiving the email notification, the client is working, but the admin email is not.

also is intended that every time we preview an email it shows on the email history?

thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy85MDE2OTgtcGFzcy1hZGRyZXNzLXRvLXRoZS1kYXRhLXVwb24tdXNlci1yZWdpc3RyYXRpb24/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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

5 years 10 months ago [\#328478](#328478) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328478 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")*

Hi,

Ah wait, I think you gave a clue here.
If you try a print_r of $data with the preview button, you won't have the address data in $data as $data is generated in the media/com_hikashop/mail/user_account_admin_notification.preview.php file and it does a simple loading of the data, not as complete as what you get with a real registration.
So I would recommend to do your test with a real registration and you should see the additional object attributes with the address information.

And yes, it's normal that the preview email appears in the email history, even though the email is not really sent.
That's because the email history is done via a plugin which implements the trigger onBeforeMailSend which is actually called after the email is generated and before the email is sent.
We do that so that other plugins can potentially modify the generated email.
Ideally, two triggers would be better, one after the email is generated and one before the email is sent, but changing the way it works would create backward compatibility issues so we preferred to leave it like that.

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

5 years 10 months ago [\#328679](#328679) by [allbs](/forum/user/40031-allbs "View allbs's Profile")  Replied by *[allbs](/forum/user/40031-allbs "View allbs's Profile")* on topic *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328679 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")*

Hi Nicolas,

thanks for the reply, I used the preview so it was that, i was thinking it was loading the address.

but we still have the problem that the new account admin notification is not getting send by the hikashop.
all the others notifications being used are being correctly send.
the HIKA_USER_ACCOUNT_ADMIN_NOTIFICATION is the only one not being send, and no information being registered on the Emails History.

how can debug where the problem is at?

thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy85MDE2OTgtcGFzcy1hZGRyZXNzLXRvLXRoZS1kYXRhLXVwb24tdXNlci1yZWdpc3RyYXRpb24/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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

5 years 9 months ago [\#328683](#328683) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328683 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")*

Hi,

That email is only sent if:
- the user registered through HikaShop's registration form (and not from Joomla's or another extension)
- the "Send Mail to Administrators" setting of the Joomla user manager is activated.

The following user(s) said Thank You: [allbs](/forum/user/40031-allbs "View allbs's Profile")

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

5 years 9 months ago [\#328718](#328718) by [allbs](/forum/user/40031-allbs "View allbs's Profile")  Replied by *[allbs](/forum/user/40031-allbs "View allbs's Profile")* on topic *[Pass address to the $data upon user registration](/forum/33-customers/901698-pass-address-to-the-data-upon-user-registration#328718 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19 -- PHP version -- : 7.4.13 -- Error-message(debug-mod must be tuned on) -- : user address not passing to the $data on HIKA&#95;USER&#95;ACCOUNT&#95;ADMIN&#95;NOTIFICATION&#95;SUBJECT  Hi, is it possible to pass the user Address the costumer created upon registration on the website?  I Print&#95;r the $data variable but it doesn't contain the user address. example below  thank you")*

Hi nicolas,

thank you, it was this option

- the "Send Mail to Administrators" setting of the Joomla user manager is activated.

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy85MDE2OTgtcGFzcy1hZGRyZXNzLXRvLXRoZS1kYXRhLXVwb24tdXNlci1yZWdpc3RyYXRpb24/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.068 seconds

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