Forums / Cotonti / Support / how to import users only

GHengeveld
#10065 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
}