From c1116ff5dc23c4e5691a6ee41b82be5970e1dbbb Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 11 Sep 2014 18:05:58 +0300 Subject: [PATCH] fix email account --- application/Espo/Services/EmailAccount.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/Espo/Services/EmailAccount.php b/application/Espo/Services/EmailAccount.php index 477e145def..aa8ceffef8 100644 --- a/application/Espo/Services/EmailAccount.php +++ b/application/Espo/Services/EmailAccount.php @@ -78,6 +78,16 @@ class EmailAccount extends Record return $foldersArr; } + public function createEntity($data) + { + $entity = parent::createEntity($data); + if ($entity) { + $entity->set('assignedUserId', $this->getUser()->id); + $this->getEntityManager()->saveEntity($entity); + } + return $entity; + } + public function fetchFromMailServer(Entity $emailAccount) { if ($emailAccount->get('status') != 'Active') {