summaryrefslogtreecommitdiff
path: root/plugins/libkolab/lib/kolab_format_distributionlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/libkolab/lib/kolab_format_distributionlist.php')
-rw-r--r--plugins/libkolab/lib/kolab_format_distributionlist.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/libkolab/lib/kolab_format_distributionlist.php b/plugins/libkolab/lib/kolab_format_distributionlist.php
index ce44f38..b6fc566 100644
--- a/plugins/libkolab/lib/kolab_format_distributionlist.php
+++ b/plugins/libkolab/lib/kolab_format_distributionlist.php
@@ -38,7 +38,20 @@ class kolab_format_distributionlist extends kolab_format
{
$this->init();
- // TODO: implement this
+ if ($object['uid'])
+ $this->kolab_object['uid'] = $object['uid'];
+
+ $this->kolab_object['last-modification-date'] = time();
+ $this->kolab_object['last-name'] = $object['name'];
+ $this->kolab_object['member'] = array();
+
+ foreach ($object['member'] as $member) {
+ $this->kolab_object['member'][] = array(
+ 'uid' => $member['uid'],
+ 'smtp-address' => $member['email'],
+ 'display-name' => $member['name'],
+ );
+ }
// set type property for proper caching
$object['_type'] = 'distribution-list';
@@ -50,7 +63,7 @@ class kolab_format_distributionlist extends kolab_format
public function is_valid()
{
- return $this->data;
+ return !empty($this->data['uid']);
}
/**