Forums / Cotonti / Support / how to import users only

Kingsley
#1 2009-03-16 17:02
Hi,

I was waiting for the tut on how to convert sed to cotonti. However, I decided that a fresh install would be better. this way I can clean up a bit.

I only want to import the users from sed. I compared the sql's users to one and eachother, and there are some differences.
I want to know how I can import the users? How do I convert them to utf-8? and what must I change in the users sql table so that it will actually work.

Thx in advance for the help.
Lombi
#2 2009-03-16 17:11
It's not that simple really. Users arent just stored in that table, but also in sed_auth (which controls all the permissions on the site).

And you cant just copy that database over since it contains other permissions as well.
<a href="http://www.domenlo.com">Surreal Art</a>
Kingsley
#3 2009-03-16 17:19
:(

to bad.. would have made live easier..
GHengeveld
#4 2009-03-16 17:38
Is sed_auth really necessary to be converted? Can't you just set the users rights afterwards?
I've recently copied all users from a different (custom) CMS to Cotonti and it worked fine. I did this by writing a small script that did something like this:
$sql = 'SELECT * FROM users'; // On old database
$query = mysql_query($sql);
while ($row = mysql_fetch_array($query)) {
$newsql = "INSERT INTO sed_users (user_id, user_name, user_password etc) 
VALUES ('".$row['user_id']."', '".$row['user_name']."', '".$row['user_password']."' etc)";
$newquery = mysql_query($newsql); // On new database
}
Lombi
#5 2009-03-16 19:50
Interesting. Last time we did exactly that hundreds of people had permission issues for certain stuff until we rebuilt the auth completely.

Glad to see your users not having those kinds of problems.
<a href="http://www.domenlo.com">Surreal Art</a>