ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Migrating existing users to a new EE site

November 04, 2011 9:16am

Subscribe [2]
  • #1 / Nov 04, 2011 9:16am

    julie p

    282 posts

    Hi all -

    I have a client who has what I think is a custom-built user subscription database. From what I know now, each user has an email address and password associated. These are recurring paying members so keeping them is crucial to my client (obviously). We want to migrate them to the new EE site, but obviously can’t keep the passwords. What have people done before to make this work? Are there any utilities that can help?

    We plan on using Solspace User, fwiw…

    Thanks!

  • #2 / Nov 04, 2011 11:27am

    Darren Miller

    103 posts

    I’ve had to do this a few times and always used a custom plugin which I run by placing a tag in a temporary template.

    The entire code is beyond the scope of a quick reply, but the things to do would be:

    1. Get your existing users from a db table or CSV

    2. Loop them

    3. build up db insert arrays and insert a member using

    $this->EE->member_model->create_member( $array_for_exp_members, $array_for_custom_fields )

    Don’t immediately give up on retaining passwords either. If the existing one is available, you may well be able to use it. Many old systems use unsalted md5 strings and this can be copied straight over.

    A more complex salted encryption may well be supported if you can find the salt. Check out the recent Auth library for what EE does these days.

    If I’m not able to recycle passwords I generate a new one using Auth::hash_password() just before insert and save them to a new CSV along with email address. These can then be distributed in whatever way seems best.

     

     

  • #3 / Nov 04, 2011 11:28am

    julie p

    282 posts

    Thanks, Darren. In terms of cost scoping, how long would you estimate this process? Since I’ve not done it before, I can’t be sure. Personally, it seems as if it shouldn’t take more than a day… sound right to you?

  • #4 / Nov 04, 2011 11:33am

    Darren Miller

    103 posts

    It really depends how much pre-processing you need to do on the source data.

    If “none” then you’ll essentially be done in a couple of hours I’d have thought.

    But it’s never that simple of course, there’s testing and being asked to repeat the import several times with different data during the course of the project etc etc!

  • #5 / Nov 04, 2011 12:09pm

    julie p

    282 posts

    of course! thanks for your insight

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases