From a8b79b4548443d43aa67e8c6f212975399baff29 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 28 Apr 2014 20:42:38 +0000 Subject: [PATCH] MailboxHandler: - validate_new_id(): make sure mailbox creation still works if the alias limit for the domain is hit git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1663 a1433add-5e2c-0410-b055-b7f2511e0802 --- model/MailboxHandler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 5889fab9..f557f56b 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -140,7 +140,10 @@ class MailboxHandler extends PFAHandler { # check if an alias with this name already exists - if yes, don't allow to create the mailbox $handler = new AliasHandler(1); + $handler->calledBy('MailboxHandler'); # make sure mailbox creation still works if the alias limit for the domain is hit + if (!$handler->init($this->id)) { + # TODO: keep original error message from AliasHandler $this->errormsg[] = Config::lang('email_address_already_exists'); return false; }