String sendMail = emailManagement.sendMail(login,
password, email, link, sendConfirmation);
if (!sendMail.equals("success"))
return new Long(-19);
}
Address adr = new Address();
adr.setStreet(street);
adr.setZip(zip);
adr.setTown(town);
adr.setStates(statemanagement.getStateById(states_id));
adr.setAdditionalname(additionalname);
adr.setComment("");
adr.setFax(fax);
adr.setPhone(phone);
adr.setEmail(email);
// If this user needs first to click his E-Mail verification
// code then set the status to 0
if (sendConfirmation) {
status = 0;
}
Long user_id = addUser(level_id, availible, status,
firstname, login, lastname, language_id, password,
adr, sendSMS, age, hash, timezone,
forceTimeZoneCheck, userOffers, userSearchs,
showContactData, showContactDataToContacts, organisations);
log.debug("Added user-Id " + user_id);
if (user_id == null) {
return new Long(-111);
}
/*
* Long adress_emails_id =
* emailManagement.registerEmail(email, address_id,""); if
* (adress_emails_id==null) { return new Long(-112); }
*/
if (adr.getAdresses_id() > 0 && user_id > 0) {
return user_id;
} else {
return new Long(-16);
}
} else {