fix email account

This commit is contained in:
Yuri Kuznetsov
2014-09-11 18:05:58 +03:00
parent 3c3518b857
commit c1116ff5dc
@@ -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') {