From f614fbf46129fffc5e66e954114ddc3ea6e7119a Mon Sep 17 00:00:00 2001 From: mszulecki Date: Tue, 22 Dec 2009 17:51:47 +0000 Subject: Make sure creator_id is correctly set when adding domains git-svn-id: http://svn.sukimashita.com/repos/mailadmin/trunk@6 4281df72-ff29-0410-8fee-2d9ac0c5f5a7 --- apps/admin/modules/domain/actions/actions.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'apps/admin/modules/domain') diff --git a/apps/admin/modules/domain/actions/actions.class.php b/apps/admin/modules/domain/actions/actions.class.php index badbf03..bd1dba3 100644 --- a/apps/admin/modules/domain/actions/actions.class.php +++ b/apps/admin/modules/domain/actions/actions.class.php @@ -21,9 +21,6 @@ class domainActions extends autodomainActions public function executeCreate() { - // populate preset values - $this->getRequest()->setParameter('domain[creator_id]', $this->getUser()->getId()); - $this->setTemplate("edit"); return $this->executeEdit(); } @@ -44,4 +41,14 @@ class domainActions extends autodomainActions { $this->redirect("mailbox/list?filter=filter&filters[domain_id]=".$this->getRequestParameter('id')); } + + protected function updateDomainFromRequest() + { + parent::updateDomainFromRequest(); + + if ($this->domain->getCreatorId() == NULL) + { + $this->domain->setCreatorId($this->getUser()->getId()); + } + } } -- cgit v1.1-32-gdbae