String url,
InternetAddress mail,
String town,
String ip
) {
PasswordEncryptor encryptor = new BasicPasswordEncryptor();
int userid = jdbcTemplate.queryForObject("select nextval('s_uid') as userid", Integer.class);
jdbcTemplate.update(
"INSERT INTO users " +
"(id, name, nick, passwd, url, email, town, score, max_score,regdate) " +
"VALUES (?,?,?,?,?,?,?,45,45,current_timestamp)",
userid,
name,
nick,
encryptor.encryptPassword(password),
url==null?null: URLUtil.fixURL(url),
mail.getAddress(),
town
);