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

#   Import users from an external database

##

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 3 months ago [\#246414](#246414) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  *[Import users from an external database](/forum/31-development/885762-import-users-from-an-external-database#246414 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.0 -- PHP version -- : 5.6.10 -- Browser(s) name and version -- : Google Chrome 51.0.2704.103 (64-bit)  I have to import customers from an external database into the #&#95;&#95;hikashop&#95;user (with custom fields) and the joomla #&#95;&#95;users table from my own made component.  Is there an available method for this  or  Can I simply use a query agains #&#95;&#95;hikashop&#95;user table.  -- Víctor")* was created by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")*

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.0
-- PHP version -- : 5.6.10
-- Browser(s) name and version -- : Google Chrome 51.0.2704.103 (64-bit)

I have to import customers from an external database into the #__hikashop_user (with custom fields) and the joomla #__users table from my own made component.

Is there an available method for this

or

Can I simply use a query agains #__hikashop_user table.

-- Víctor

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

10 years 3 months ago [\#246432](#246432) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Import users from an external database](/forum/31-development/885762-import-users-from-an-external-database#246432 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.0 -- PHP version -- : 5.6.10 -- Browser(s) name and version -- : Google Chrome 51.0.2704.103 (64-bit)  I have to import customers from an external database into the #&#95;&#95;hikashop&#95;user (with custom fields) and the joomla #&#95;&#95;users table from my own made component.  Is there an available method for this  or  Can I simply use a query agains #&#95;&#95;hikashop&#95;user table.  -- Víctor")*

Hi,

How are you going to generate the password in the Joomla user table with the format corresponding to Joomla ?
That's the big question here.
The HikaShop part is the easy part. You'll just need an update query to add the hikashop_user rows with the user id coming from the joomla user table and the custom fields data coming from your component data.

The following user(s) said Thank You: [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")

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

- **[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")**
- [![PeterChain's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar570.png)](/forum/user/570-peterchain "View PeterChain's Profile") Topic Author
- [ Offline](/forum/user/570-peterchain)

Less More

- Posts: 640
- Thank you received: 16
-
-

10 years 3 months ago [\#246448](#246448) by [PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")  Replied by *[PeterChain](/forum/user/570-peterchain "View PeterChain's Profile")* on topic *[Import users from an external database](/forum/31-development/885762-import-users-from-an-external-database#246448 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.0 -- PHP version -- : 5.6.10 -- Browser(s) name and version -- : Google Chrome 51.0.2704.103 (64-bit)  I have to import customers from an external database into the #&#95;&#95;hikashop&#95;user (with custom fields) and the joomla #&#95;&#95;users table from my own made component.  Is there an available method for this  or  Can I simply use a query agains #&#95;&#95;hikashop&#95;user table.  -- Víctor")*

> nicolas wrote: Hi,
>
> How are you going to generate the password in the Joomla user table with the format corresponding to Joomla ?
> That's the big question here.
> The HikaShop part is the easy part. You'll just need an update query to add the hikashop\_user rows with the user id coming from the joomla user table and the custom fields data coming from your component data.

Well, my option was to use the function register() on the UsersModelRegistration and use the id returning from the function to make an insert to the #__hikashop_users table, but i didn't know if i can do it from this way or there's a function in Hikashop that allows you to do it.

-- Víctor

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

10 years 3 months ago [\#246461](#246461) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Import users from an external database](/forum/31-development/885762-import-users-from-an-external-database#246461 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.0 -- PHP version -- : 5.6.10 -- Browser(s) name and version -- : Google Chrome 51.0.2704.103 (64-bit)  I have to import customers from an external database into the #&#95;&#95;hikashop&#95;user (with custom fields) and the joomla #&#95;&#95;users table from my own made component.  Is there an available method for this  or  Can I simply use a query agains #&#95;&#95;hikashop&#95;user table.  -- Víctor")*

Hi,

Well, there is the save function of the class.user of HikaShop, to do it, but in your case, doing a simple insert in MySQL will do the same and will be simpler to implement so I would go with the insert.

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

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