116,15 → 116,23 |
|
mailbox = MailboxManager.getInstance().create(user); |
|
// FIXME: create an user as owner of the new mailbox here |
// FIXME: create an user as owner of the new mailbox here, |
// create a mail alias with the same name |
} |
else { |
mailbox = MailboxManager.getInstance().get(user, boxId); |
} |
|
mailbox.setLogin(user, (String)theForm.get("login")); |
mailbox.setDomain(user, InetDomainManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("domain")))); |
|
String login = (String)theForm.get("login"); |
if(MailboxManager.getInstance().loginExists(user, mailbox, login)) { |
handleErrors(mapping, form, request, response); |
throw new UserException(CoreResources.NONUNIQUE_MAILBOX_LOGIN); |
} |
mailbox.setLogin(user, login); |
|
mailbox.setOwner(user, UserManager.getInstance().get(user, |
StringConverter.parseLong(theForm.get("owner")))); |
mailbox.setVirusCheck(user, (Boolean)theForm.get("viruscheck")); |