Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Importing users to the CB user database.

  • gvaneijk
  • gvaneijk
  • OFFLINE
  • Posts: 23
  • Thanks: 2
  • Karma: 1
11 years 7 months ago #224066 by gvaneijk
I have a database with users from an old website.
The website itself does not exist anymore, but I do need to import the users to the new database.

Normally I would import them in the joomla user table and then I believe you can synchronize it with Community Builder.

However the joomla user table only has a single field for the name, so it becomes First + Last name in one field. But I want to keep the first and last name fields split, like the comprofiler table does.

What would be the workaround here? Should I import the users in the comprofiler instead? Can I synchronize it the other way around to the joomla user table where the first + last name get put in 1 field. :huh:

I've looked around but haven't found a solution thusfar, any help would be greatly appreciated.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 7 months ago #224079 by krileon
Replied by krileon on topic Importing users to the CB user database.
If there is and never was CB data associated with them I suppose you could directly import their user row and their ACL to Joomlas _users table then just run Tools > Synchronize from CBs backend to synchronize their rows with CBs table. The best way to import into CB though is using a CSV file with CB Juice and it should work fine even with just a basic import file of name, email, etc...


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • gvaneijk
  • gvaneijk
  • OFFLINE
  • Posts: 23
  • Thanks: 2
  • Karma: 1
11 years 6 months ago #224437 by gvaneijk
Replied by gvaneijk on topic Importing users to the CB user database.
Krileon, thank you for your reply.


The database I have is a Joomla 1.5, with an older CB version.

I've just found CB Juice and I'm wondering about something.

If I look at the old database I don't find passwords in the Comprofiler table, I do find those in the Joomla User table. The passwords will need to be transfered aswel so that old users can login using their password instead of having to fill in some new password.

Now in CB Juice I see that I can import with a password field, how exactly does this work?


I figure I would need to make a CSV file containing the following:

joomla ID
first name
last name
username (same as email)
email adress
password

How exactly would this work?
The password isn't in the comprofiler table, yet it can be imported, will it be set into the Joomla user table? And how does it handle the name, will it take first + last name and fill it in in the name field in the Joomla user table?

And if I would do it the other way around, i.e. import the users into the Joomla User table and then use the synchronize tool from CB, that would skip the 'password-issue' but how would it handle the name? Joomla's table only has a field for name, not for first and last name, would the synchronize function split this at the first space?


Mind you the amount of users is very high (around 900.000). Therefor I would prefer a sql import, though I'm not sure how to go about that considering there are some different fields and such.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago - 11 years 6 months ago #224463 by krileon
Replied by krileon on topic Importing users to the CB user database.

If I look at the old database I don't find passwords in the Comprofiler table, I do find those in the Joomla User table. The passwords will need to be transfered aswel so that old users can login using their password instead of having to fill in some new password.

CB doesn't store password, username, or email; that's all kept in Joomlas _users table. We do store Name somewhat, but we just take the name from _users and split it up.

Now in CB Juice I see that I can import with a password field, how exactly does this work?

It probably won't because your passwords are already encoded. What you'll need to do after importing is probably change all the users passwords to the encrypted password in your old database unless CB Juice can handle already encrypted passwords. I suggest posting your CB Juice questions to the CB Juice forums below for better clarification on its usage.

www.joomlapolis.com/forum/226-cb-juice

And if I would do it the other way around, i.e. import the users into the Joomla User table and then use the synchronize tool from CB, that would skip the 'password-issue' but how would it handle the name? Joomla's table only has a field for name, not for first and last name, would the synchronize function split this at the first space?

Yes, this avoids the password issue (if there is one as CB Juice may handle this fine). CB just takes the name column from _users and splits it up so when you run CB > Tools > Synchronize it'll do that for you.

The biggest issue with moving users like this is ACL tables. Keeping their usergroup association actually working between say J1.5 and J2.5 isn't easy because J2.5 has a completely different implementation, which is why I suggest CB Juice as it'll use API to store the user.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 6 months ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum