13
// Add real name
$name = $liste[0];
// End
// Add real name
$uname = $liste[1];
// End
// Add real name
$email = $liste[2];
// End
// Add website
$url = $liste[3];
// End
// Add website
$user_regdate = $liste[4];
// End
// Add Password
$pass= md5(trim($liste[5]));
// End
// Add avatar
$user_avatar = "blank.gif";
// End
$rank = "1"; // Choose rank
$attachsig = "1";
$user_mailok = "1"; // Choose 1 if you allow administrator to send email
// Add user in xoops_users table
$query = "insert into ".$prefix."_users (name, uname, email, url,user_regdate, pass, user_avatar, rank, attachsig, user_mailok) VALUES ('".$name."','".$uname."', '".$email."','".$url."', '".$user_regdate."', '".$pass."', '".$user_avatar."', '".$rank."', '".$attachsig."', '".$user_mailok."')";
$result= mysql_query($query);
$uid = mysql_insert_id();
//Add user in group : registered users per default
$numgroup ='2';// choose Group number
$query = "insert into ".$prefix."_groups_users_link (groupid, uid) VALUES('".$numgroup."', '".$uid."')";
$result= mysql_query($query);
if (mysql_error()){
echo "Error in database : ".mysql_error();
echo "
Importation stoppee.
";
fclose($fp);
exit();
}else{
echo " ".$uid." | ".$uname." |
";
}
}
echo "
Import finished successfully.";// That's ok !
fclose($fp);
?>
I believe this is the right order, but i still get a succesful upload without password, email, and name. Any help?? When i do an import the uid is keep updating. Can i reset it to 2? 1 is the admin user.