Hi,
I have a CSV file with ~700 records in. I would very much like this information integrated with my site.
having been a long time joomla user, this is the first time i’ve worked with MODx.
Is there any "easy" way to integrate all this information (the CSV contains usernames, passwords, profile information etc from an old site) into my new site? I’m using WebloginPE I believe but don’t really understand what I’m doing.
Would I import the CSV file to the web_user_attributes_extended table? I’m a little confused how to access data from this table, or even if I’m using it correctly. Currently my extended attributes table contains columns which relate to the CSV, with the addition of id and internalKey fields.
I also have the problem that my CSV file contains usernames and passwords, but these would need to go in to "web_users" table presumably. I guess I have two tables worth of data in one CSV file. Or can I modify Weblogin sufficiently to make it use the usernames and passwords already in the CSV file, as opposed to requiring me entering it all manually.
Hope i’m clear enough, I can elaborate if necessary.
thank you
-
☆ A M B ☆
- 2,475 Posts
It would be pretty simple to do that via MySQL’s "LOAD INFILE" command. The only thing that may be difficult is the passwords -- are they stored plaintext in your CSV? Or are they hashed? I’m not sure if the WebLoginPE Snippet (or MODx logins in general) use MySQL’s or PHP’s hashing algorithm... I think they are very similar, but I’m not sure if they are the same. This could be a problem if a user’s password is something like "cat" and it is hashed using one algorithm to something like "abcdefgh0123456789", and using another algorithm to something like "9876543210hgfedcba". Does that make sense? You could upload the information to the database and prompt users to update their passwords in the same way you would if a user forgot their password.
-
☆ A M B ☆
- 24,524 Posts
MODx uses a plain MD5 hash.