Import users... MySQL?

Permalink 1 user found helpful
Hi All,

I've been trying to use Kino's import users which I can't get to work plus he's not responding to emails. The add-on doesn't seem to work with the current version of C5.

I urgently need a way of importing users, emails and passwords (groups and threads in the forum would also be useful) into C5.

Could I do this using MySQL? which databases would I need to edit/add to? i don't want to mess anything up, can anyone from the Core team advise which databases I need to write to to add users please :-)

Thanks

BHWW
 
olsgreen replied on at Permalink Best Answer Reply
olsgreen
Not a member of the core team but ....

For basic users without any atriutes just the table 'Users' will do, you will have to hash the passwords to your salt though.

If you want to import more advanced options the tables named Users* contain all the information.

For instance, UserAttributeValues contain each users attribute values, UserSearchIndexAttribues contains the index for users attribute values for search functionality.

Oliver
BHWW replied on at Permalink Reply
BHWW
Hi great, I've managed to import them and assign them their groups, any idea how i now assign them their forum posts, i.e. i added all the previous forum posts using the admin user to save signing in and out as different folks, now i want to tweak the database so it knows who did what, any idea?

Thanks
olsgreen replied on at Permalink Reply
olsgreen
I haven't got that installed, however, they will most probably be tied via user ID.

If you have a look at the tables in your database you should be able to find the one containing the forum posts, most are logically named. Each post will probably have a column in the table named uID. That is the ID of the user as per the uID column in the table Users.

Hope this helps,

O
BHWW replied on at Permalink Reply
BHWW
Thanks Oliver,

Thats what I thought too, but when I changes the UID the post stayed linked to the original user, so i thought there must be another thing that needed changing elsewhere. Will carry on fiddling, cheers

Ben
olsgreen replied on at Permalink Reply
olsgreen
Have you cleared your cache?
BHWW replied on at Permalink Reply
BHWW
Hi I have the cache turned off, but i have tried clearing it and still no joy.
Remo replied on at Permalink Reply 1 Attachment
Remo
check the attached addon. I never really finished it but it already has more features than kino's commercial addon..

It doesn't valid your input! email address is needed, package doesn't complain if you forget it.. Well, it does, but in a not so nice way (:
KenHarvestClouds replied on at Permalink Reply
KenHarvestClouds
@Remo - Does it salt the password? Or should I set the password to a default pre-salted password?

Also, a two part question! Is it possible to add more fields to the import? And if not, is it possible to use the tool to modify existing entries by only including those columns that are changing?
ScottC replied on at Permalink Reply
ScottC
load the encryption helper and pass it through and pull it back via that :), if it doesn't encrypt it then talk to your web host.
KenHarvestClouds replied on at Permalink Reply
KenHarvestClouds
I'm doing the import through Remo's package. Does what you are talking about require code?
Remo replied on at Permalink Reply
Remo
You just enter the password in plain text, the add-on does everything else... Salt+Hash

Yes, you can add more fields. At the moment you have to copy & paste some fields but I'll probably add a more elegant solution someday.
Mnkras replied on at Permalink Reply
Mnkras
ill take a look at kino's addon later this week to see whats going on with it
KenHarvestClouds replied on at Permalink Reply
KenHarvestClouds
I changed the 10 in the code to 20! That took care of being able to enter everything!

Thanks for the password answer! That will make it easier for our customers.

One thing I'll be looking to do in the near future is automate the process of updating the user database from information that we collect from our Point of Sale system.

Ideally, we'd be able to completely sync the two.


Now the only other thing I'm needing to figure out, is how to subscribe users to mailing lists. This seems to be an issue on the Site Registration form, and when importing users. It is as if you've got to have a separate form just for the mailing list.
invision replied on at Permalink Reply
invision
I can't seem to get your tool to import my users' groups. How should the group be listed in the CSV file: by the handle, the group name, or the groupID in the database?

Also, the tool imports only the first record. The final column in the first record has the first column of the second record appended to it.

What am i missing?
invision replied on at Permalink Reply
invision
Remo,

This import users is a great little add-on, just wondering what to use for groups in a CSV file?

Should I use the groupID in the database (I already have the groups set up), or the group name? I can't get either to work.

Any help is greatly appreciated.
invision replied on at Permalink Reply
invision
Never mind. The problem wasn't with Remo's add-on, I figured out Excel was adding some junk characters (thanks, Bill Gates) when saving a CSV.

The other issue I mentioned earlier about Remo's add-on importing only the first record was because of Mac's method of using only CR for a hard return, not CR/LF. Opened it in BBEdit to check it and that fixed it.
nickratering replied on at Permalink Reply
nickratering
Hi Remo,

YES, PLEASE DO finish this addon ;-) I already like it!!!
Can you make it 5.6 compatible?

Best regards,
Nick
kino replied on at Permalink Reply
kino
Here are those made to correspond to Ver 5.6.

http://c5.tktools.jp/downloads/for_5.6/packages/kino_importusers_fo...