From eb79ffcceaccd909f7b0cd09b025b2dfb6c426e0 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Sat, 31 Mar 2012 19:24:47 +0200 Subject: Generate the uid and preseed it into the recipient policy if it does not already exist. --- lib/api/kolab_api_service_form_value.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/api') diff --git a/lib/api/kolab_api_service_form_value.php b/lib/api/kolab_api_service_form_value.php index fe3cf6c..f601bd9 100644 --- a/lib/api/kolab_api_service_form_value.php +++ b/lib/api/kolab_api_service_form_value.php @@ -346,6 +346,12 @@ class kolab_api_service_form_value extends kolab_api_service } } + if (array_key_exists('uid', $attribs['auto_form_fields'])) { + if (!array_key_exists('uid', $postdata)) { + $postdata['uid'] = $this->generate_uid($postdata, $attribs); + } + } + $primary_mail = kolab_recipient_policy::primary_mail($postdata); return $primary_mail; @@ -387,6 +393,12 @@ class kolab_api_service_form_value extends kolab_api_service } } + if (array_key_exists('uid', $attribs['auto_form_fields'])) { + if (!array_key_exists('uid', $postdata)) { + $postdata['uid'] = $this->generate_uid($postdata, $attribs); + } + } + $secondary_mail = kolab_recipient_policy::secondary_mail($postdata); return $secondary_mail; -- cgit v1.1