1

Ok this is now a general question as I managed to import the user table to the database.

Unfortunately it appears that whilst the users all show in the database they do not show in the CMS. Digging a bit deeper it seems they are related to the elements table as each appear to have an entry with a type User.

So my question now is how can you import your existing user list into a new craft set up without breaking it or anything else. With over 10000 users this is not one to be done manually.

Any help appreciated.

1

1 Answer 1

1

You can use an existing import/export plugin that supports handling users, or you can write your own plugin that calls Craft's UsersService->saveUser(), which takes care of saving the right data into the right tables in the database.

2
  • cheers @Brad tried using the import plugin but the csv file I am importing is large. The whole database comes in at 38mb. We've stripped the csv down to only include user related tables. (not sure on what needs to be included here any advice welcome) which still comes in at 7.5mb and I get this error: Fatal error: Out of memory (allocated 34078720) (tried to allocate 107 bytes) in crafttest/craft/plugins/import/services/ImportService.php on line 725 Is there a way to increase the limit?
    – Lettie
    May 28, 2015 at 11:46
  • 1
    I have now managed to add the users to the database along with the elements table and elements_i18nl table. Without the plugin due to above. I have emailed Bob to look into this. My problem now is that the users show in the database as enabled and I can login with a user. However in the CP none of the users are showing except the original 3 users I set up. What am I missing? Another table that needs to be imported?
    – Lettie
    May 28, 2015 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.