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

#   Link to confirm new account empties custom fields

##

- **[Taz\_1999](/forum/user/9424-taz-1999 "View Taz&#95;1999's Profile")**
- [![Taz&#95;1999's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9424-taz-1999 "View Taz&#95;1999's Profile") Topic Author
- [ Offline](/forum/user/9424-taz-1999)

Less More

- Posts: 20
- Thank you received: 2
-
-

13 years 11 months ago [\#79636](#79636) by [Taz\_1999](/forum/user/9424-taz-1999 "View Taz&#95;1999's Profile")  *[Link to confirm new account empties custom fields](/forum/3-bug-report/76303-link-to-confirm-new-account-empties-custom-fields#79636 "Hi  I have searched the forums for an answer to this. This error occurs both in newest Hikashop 2.0.0 and also the most current version previous to that.  The shop is a Joomla! 2.5.8, Hikashop 2.0.0 and it has one custom field:birthday  This is a textfield, for the user table, required and it is set to appear everywhere (frontpage, controlpanel, listing and it is active), see screenshots.  I also has activated the plugin &quot;HikaShop joomla user account link plugin&quot;. See screen shot.  This is what happens: A user registers and has to enter a birtday, a javascript makes sure of that. The birtday is stored in the table, I can se that happens (with the use of PHPMyAdmin).  A link is sent to the user to confirm the account and email. After the user clicks the link in the email, the data in the custom field birtday is gone. The custom field is emptied by the user clicking the link in the confirm account email.  Also, if I turn off the plugin, there is no difference. The custom field is emptied then too.  This is not so good, we can't open the store without this information about our customers. :)")* was created by *[Taz\_1999](/forum/user/9424-taz-1999 "View Taz&#95;1999's Profile")*

Hi

I have searched the forums for an answer to this. This error occurs both in newest Hikashop 2.0.0 and also the most current version previous to that.

The shop is a Joomla! 2.5.8, Hikashop 2.0.0 and it has one custom field:birthday

This is a textfield, for the user table, required and it is set to appear everywhere (frontpage, controlpanel, listing and it is active), see screenshots.

I also has activated the plugin "HikaShop joomla user account link plugin". See screen shot.

This is what happens: A user registers and has to enter a birtday, a javascript makes sure of that. The birtday is stored in the table, I can se that happens (with the use of PHPMyAdmin).

A link is sent to the user to confirm the account and email. After the user clicks the link in the email, the data in the custom field birtday is gone. The custom field is emptied by the user clicking the link in the confirm account email.

Also, if I turn off the plugin, there is no difference. The custom field is emptied then too.

This is not so good, we can't open the store without this information about our customers. ![:)](/media/kunena/emoticons/3.png ":)")

- [ ![personnummer-settings.jpg](/forum/attachment/7273) ](/forum/attachment/7273 "...r-settings.jpg") [ ](/forum/attachment/7273?download=1 "...r-settings.jpg")
- [ ![personnummer-checkboxes.jpg](/forum/attachment/7274) ](/forum/attachment/7274 "...checkboxes.jpg") [ ](/forum/attachment/7274?download=1 "...checkboxes.jpg")
- [ ![plugin-joomla-user-account-link-plugin.jpg](/forum/attachment/7275) ](/forum/attachment/7275 "...ink-plugin.jpg") [ ](/forum/attachment/7275?download=1 "...ink-plugin.jpg")
- [ ![phpmyadmin-birthday-after-link-activation.jpg](/forum/attachment/7276) ](/forum/attachment/7276 "...activation.jpg") [ ](/forum/attachment/7276?download=1 "...activation.jpg")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#79738](#79738) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Link to confirm new account empties custom fields](/forum/3-bug-report/76303-link-to-confirm-new-account-empties-custom-fields#79738 "Hi  I have searched the forums for an answer to this. This error occurs both in newest Hikashop 2.0.0 and also the most current version previous to that.  The shop is a Joomla! 2.5.8, Hikashop 2.0.0 and it has one custom field:birthday  This is a textfield, for the user table, required and it is set to appear everywhere (frontpage, controlpanel, listing and it is active), see screenshots.  I also has activated the plugin &quot;HikaShop joomla user account link plugin&quot;. See screen shot.  This is what happens: A user registers and has to enter a birtday, a javascript makes sure of that. The birtday is stored in the table, I can se that happens (with the use of PHPMyAdmin).  A link is sent to the user to confirm the account and email. After the user clicks the link in the email, the data in the custom field birtday is gone. The custom field is emptied by the user clicking the link in the confirm account email.  Also, if I turn off the plugin, there is no difference. The custom field is emptied then too.  This is not so good, we can't open the store without this information about our customers. :)")*

Hi,

Please edit the plugin "system hikashopuser".
And replace the code Code:

$oldUser = $userClass-&gt;get($hikaUser-&gt;user_id); $fieldsClass = hikashop_get('class.field'); $element = $fieldsClass-&gt;getInput('user', $oldUser); if(!empty($element)){ foreach($element as $key =&gt; $value) { $hikaUser-&gt;$key = $value; } }

By Code:

$formData = JRequest::getVar('user', array(), '', 'array'); if(!empty($formData)) { $oldUser = $userClass-&gt;get($hikaUser-&gt;user_id); $fieldsClass = hikashop_get('class.field'); $element = $fieldsClass-&gt;getInput('user', $oldUser); if(!empty($element)){ foreach($element as $key =&gt; $value) { $hikaUser-&gt;$key = $value; } } }

It should fix your problem.

Best regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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