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

#   I try to understand how the table '\_hikashop\_user' works

##

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

Less More

- Posts: 148
- Thank you received: 21
-
-

3 years 9 months ago [\#348513](#348513) by [FDBI](/forum/user/63027-fdbi "View FDBI's Profile")  *[I try to understand how the table '\_hikashop\_user' works](/forum/2-general-talk-about-hikashop/905742-i-try-to-understand-how-the-table-hikashop-user-works#348513 "Hi,  While searching the database, I found some recent entries that are a bit different and I wanted to know if this is normal and understand it.  I think it's since version 4.6.2 of Hikashop and we don't have version 4.7.0 installed yet.  In the '&#95;hikashop&#95;user' table, I have few new users with the field 'user&#95;cms&#95;id 'setted to 0 In the '&#95;hikashop&#95;address', I have few addresses with the field 'address&#95;user&#95;id' setted to 0 and rows fully empty in this case.  I also noted the appearance of a new field 'user&#95;created' always filled since few rows. Since this field looks like a timestamp, is there now some kind of automatic cleanup?  These changes may be indicated somewhere, but it is mainly that I find it difficult to understand what is happening.  Before, I understood that if a user was ordering as a guest, the 'user&#95;cm&#95;id' or 'user&#95;id' of the '&#95;hikashop&#95;user' table was not added in the '&#95;users' table.  Can you explain to me how this works?  Thanks in advance.")* was created by *[FDBI](/forum/user/63027-fdbi "View FDBI's Profile")*

Hi,

While searching the database, I found some recent entries that are a bit different and I wanted to know if this is normal and understand it.

I think it's since version 4.6.2 of Hikashop and we don't have version 4.7.0 installed yet.

In the '_hikashop_user' table, I have few new users with the field 'user_cms_id 'setted to 0
In the '_hikashop_address', I have few addresses with the field 'address_user_id' setted to 0 and rows fully empty in this case.

I also noted the appearance of a new field 'user_created' always filled since few rows.
Since this field looks like a timestamp, is there now some kind of automatic cleanup?

These changes may be indicated somewhere, but it is mainly that I find it difficult to understand what is happening.

Before, I understood that if a user was ordering as a guest, the 'user_cm_id' or 'user_id' of the '_hikashop_user' table was not added in the '_users' table.

Can you explain to me how this works?

Thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwNTc0Mi1pLXRyeS10by11bmRlcnN0YW5kLWhvdy10aGUtdGFibGUtaGlrYXNob3AtdXNlci13b3Jrcz90bXBsPW1hcmtkb3du) or [Create an account](/register) 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: 86322
- Thank you received: 14280
-
-

3 years 9 months ago [\#348515](#348515) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[I try to understand how the table '\_hikashop\_user' works](/forum/2-general-talk-about-hikashop/905742-i-try-to-understand-how-the-table-hikashop-user-works#348515 "Hi,  While searching the database, I found some recent entries that are a bit different and I wanted to know if this is normal and understand it.  I think it's since version 4.6.2 of Hikashop and we don't have version 4.7.0 installed yet.  In the '&#95;hikashop&#95;user' table, I have few new users with the field 'user&#95;cms&#95;id 'setted to 0 In the '&#95;hikashop&#95;address', I have few addresses with the field 'address&#95;user&#95;id' setted to 0 and rows fully empty in this case.  I also noted the appearance of a new field 'user&#95;created' always filled since few rows. Since this field looks like a timestamp, is there now some kind of automatic cleanup?  These changes may be indicated somewhere, but it is mainly that I find it difficult to understand what is happening.  Before, I understood that if a user was ordering as a guest, the 'user&#95;cm&#95;id' or 'user&#95;id' of the '&#95;hikashop&#95;user' table was not added in the '&#95;users' table.  Can you explain to me how this works?  Thanks in advance.")*

Hi,

When a user goes through the checkout and registers, first a Joomla user account is created in the users table. After that, HikaShop creates a corresponding entry in hikashop_user and uses the "id" from the users table to fill the user_cms_id column in hikashop_user.
If the user goes through the checkout as a guest, then nothing is created in the users table. Only an entry in the hikashop_user table is created, and thus the user_cms_id is set to 0.
The user_created column has always been in the hikashop_user table and always filled with the timestamp of when the user is added to the table.
There is no auto cleanup of hikashop_user entries. Either they are linked to the users table and you don't want to delete the user account of users automatically (at least not normally), or they are linked to an order in the hikashop_order table, and you don't want to delete that link either or you'll have an order without an email address.

When an address is created in the hikashop_address table, the user_id from the hikashop_user table for the current user is set in the address_user_id column.
I'm not sure how you get entries with the address_user_id column empty and all the other columns empty. It should not be happening. I suppose it's a glitch but well, since the address is not linked to anything, it just won't appear anywhere and you can just ignore them.

The following user(s) said Thank You: [FDBI](/forum/user/63027-fdbi "View FDBI's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwNTc0Mi1pLXRyeS10by11bmRlcnN0YW5kLWhvdy10aGUtdGFibGUtaGlrYXNob3AtdXNlci13b3Jrcz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 148
- Thank you received: 21
-
-

3 years 9 months ago [\#348520](#348520) by [FDBI](/forum/user/63027-fdbi "View FDBI's Profile")  Replied by *[FDBI](/forum/user/63027-fdbi "View FDBI's Profile")* on topic *[I try to understand how the table '\_hikashop\_user' works](/forum/2-general-talk-about-hikashop/905742-i-try-to-understand-how-the-table-hikashop-user-works#348520 "Hi,  While searching the database, I found some recent entries that are a bit different and I wanted to know if this is normal and understand it.  I think it's since version 4.6.2 of Hikashop and we don't have version 4.7.0 installed yet.  In the '&#95;hikashop&#95;user' table, I have few new users with the field 'user&#95;cms&#95;id 'setted to 0 In the '&#95;hikashop&#95;address', I have few addresses with the field 'address&#95;user&#95;id' setted to 0 and rows fully empty in this case.  I also noted the appearance of a new field 'user&#95;created' always filled since few rows. Since this field looks like a timestamp, is there now some kind of automatic cleanup?  These changes may be indicated somewhere, but it is mainly that I find it difficult to understand what is happening.  Before, I understood that if a user was ordering as a guest, the 'user&#95;cm&#95;id' or 'user&#95;id' of the '&#95;hikashop&#95;user' table was not added in the '&#95;users' table.  Can you explain to me how this works?  Thanks in advance.")*

Thanks for your answer.

Firstly, sorry for the wrong information on the 'user_created' column, it does indeed always existed and I don't know why I mentioned it.
For my table 'hikashop_address', I would watch if it happens again, but I haven't noticed any malfunction in the orders.

Everything seems clear, thank you !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzkwNTc0Mi1pLXRyeS10by11bmRlcnN0YW5kLWhvdy10aGUtdGFibGUtaGlrYXNob3AtdXNlci13b3Jrcz90bXBsPW1hcmtkb3du) or [Create an account](/register) 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.050 seconds

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

[](#top)
