<![CDATA[ [SOLVED] Importing Evo to Revo Users - My Forums]]> https://forums.modx.com/thread/?thread=71556 <![CDATA[Re: [SOLVED] Importing Evo to Revo Users]]> https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-515677
Jason's code, BTW, is very cool, but it's not necessary to let users log in. As long as their hash class was hashing.modMD5 in the Evo DB and remains the same, they will be able to log in. What Jason's pbkdf2Convert plugin does is convert their hashing algorithm to the more secure PBKDF2 algorithm. Here is the full pbkdf2Convert code:

if (!empty($user) && $user->get('hash_class') === 'hashing.modMD5' && !empty($password) && $user->passwordMatches($password)) {
    $user->set('hash_class', 'hashing.modPBKDF2');
    $user->set('password', $password);
    $user->save();
}


You also need to be concerned about the character sets of the the two Databases and the character set settings in the two MODX config files.

There are whole lot of other things to worry about if you're transferring more than just the users.

I was recently working on a program to move sites from Evo to Revo and it blew up in my face when I discovered that converting data in a Database to JSON format is unreliable. I hope to get back to it soon using a different method.

@flinx77: Make sure the salt and cachepwd fields for each user are empty and the hash_class field is set to hashing.modMD5.
]]>
BobRay Nov 25, 2014, 08:39 PM https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-515677
<![CDATA[Re: [SOLVED] Importing Evo to Revo Users]]> https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-515673 flinx777 Nov 25, 2014, 07:55 PM https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-515673 <![CDATA[Re: [SOLVED] Importing Evo to Revo Users]]> https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-424042 deniro0311 May 18, 2012, 01:57 PM https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-424042 <![CDATA[ [SOLVED] Importing Evo to Revo Users]]> https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-399079
Hi,

I'm using phpMyAdmin to move 400+ users from Evo to Revo 2.1.3, along with their respective MD5 hash passwords.

First, I logged in and installed pbkdf2Convert. Very important! Without it, Evo Users will not be able to login. Yeah, they could use the forgot your password functionality, but there is no way I'm asking 400 users to do that. It would be the end of the site.

Note that the hashClass - thank you thank you thank you Opengeek for pbkdf2Convert! - is MD5. This allows Jason's pbkdf2Convert to do it's trick.

Second, I executed the SQL via phpMyadmin is:
INSERT INTO `revo_users` (`id`, `username`, `password`, `cachepwd`, `class_key`, `active`, `remote_key`, `remote_data`, `hash_class`, `salt`)
VALUES ('', 'Testing', 'ae2b1fca515949e5d54fb22b8ed95575', '', 'modUser', 1, NULL, NULL, '[b]hashing.modMD5[/b]', '');
--
INSERT INTO `revo_user_attributes` (`id`, `internalKey`, `fullname`, `email`, `phone`, `mobilephone`, `blocked`, `blockeduntil`, `blockedafter`, `logincount`, `lastlogin`, `thislogin`, `failedlogincount`, `sessionid`, `dob`, `gender`, `address`, `country`, `city`, `state`, `zip`, `fax`, `photo`, `comment`, `website`, `extended`) VALUES ('', '', 'Testing Evo2Revo', '[email protected]', '', '', 0, 0, 0, 0, '', '', 0, '', '', '', '', '', '', '', '', '', '', '', '', '[]');
--
INSERT INTO `revo_member_groups` (`id`, `user_group`, `member`, `role`, `rank`) 
VALUES ('', 3, 14, 1, 0);


The last table has the # 14. I know this number from the increment associated from the previous 2 tables. It assigns the user to user group #3.

Here's where it gets funky, hairy and scary: after the import into those 3 tables, do this:
1) Clear Cache
2) Flush Permissions
3) Flush All Sessions

Log back in and test a Users login. It should work.

It took a lot of digging through each Revo table to find that Access Permissions that you see in the MGR is in fact "revo_member_groups".

It would be very helpful is someone with programming skills (that is sooooo not me!) could come up with a way to import users. Provisioner doesn't work on 2.1.3 (due to the pw hash method changed?). And I'm not sure modifying ImportX would work? Maybe it would since I've built my SQL file using Excel.

At any rate, I hope there would be a toolset that would allow for importing Evo to Revo.]]>
ultrasef Nov 04, 2011, 01:32 PM https://forums.modx.com/thread/71556/importing-evo-to-revo-users#dis-post-399079