inc/users.inc.php
changeset 8 47dd15d8bb8c
parent 4 55ed92aa7cf5
child 26 5d63f1e71d6e
equal deleted inserted replaced
7:ac0ca51809b1 8:47dd15d8bb8c
   219 
   219 
   220 		// Clean up the fullname
   220 		// Clean up the fullname
   221 		$fullname = mysql_escape_string($fullname);
   221 		$fullname = mysql_escape_string($fullname);
   222 		is_valid_email($email);
   222 		is_valid_email($email);
   223 
   223 
   224 		// Get id and insert information.
   224 		$db->query("INSERT INTO users (username, password, fullname, email, description, level, active) VALUES ('$user', '" . md5($password) . "', '$fullname', '$email', '$description', '$level', '$active')");
   225 		$idusers= $db->nextID('users');
       
   226 		$db->query("INSERT INTO users (id, username, password, fullname, email, description, level, active) VALUES ($idusers, '$user', '" . md5($password) . "', '$fullname', '$email', '$description', '$level', '$active')");
       
   227 		return true;
   225 		return true;
   228 	}
   226 	}
   229 	else
   227 	else
   230 	{
   228 	{
   231 		error(ERR_USER_EXISTS);
   229 		error(ERR_USER_EXISTS);