summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/api/kolab_api_service_group.php12
-rw-r--r--lib/api/kolab_api_service_user.php12
2 files changed, 20 insertions, 4 deletions
diff --git a/lib/api/kolab_api_service_group.php b/lib/api/kolab_api_service_group.php
index 3e82f0d..9ff1835 100644
--- a/lib/api/kolab_api_service_group.php
+++ b/lib/api/kolab_api_service_group.php
@@ -91,7 +91,11 @@ class kolab_api_service_group extends kolab_api_service
if (isset($gta['fields'])) {
foreach ($gta['fields'] as $key => $value) {
- $group_attributes[$key] = $gta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $group_attributes[$key] = $gta['fields'][$key];
+ } else {
+ $group_attributes[$key] = $postdata[$key];
+ }
}
}
@@ -193,7 +197,11 @@ class kolab_api_service_group extends kolab_api_service
if (isset($gta['fields'])) {
foreach ($gta['fields'] as $key => $value) {
- $group_attributes[$key] = $gta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $group_attributes[$key] = $gta['fields'][$key];
+ } else {
+ $group_attributes[$key] = $postdata[$key];
+ }
}
$group_attributes[$unique_attr] = $postdata[$unique_attr];
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index a5c58e2..0bce631 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -98,7 +98,11 @@ class kolab_api_service_user extends kolab_api_service
if (isset($uta['fields'])) {
foreach ($uta['fields'] as $key => $value) {
- $user_attributes[$key] = $uta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $user_attributes[$key] = $uta['fields'][$key];
+ } else {
+ $user_attributes[$key] = $uta['fields'][$key];
+ }
}
}
@@ -204,7 +208,11 @@ class kolab_api_service_user extends kolab_api_service
if (isset($uta['fields'])) {
foreach ($uta['fields'] as $key => $value) {
- $user_attributes[$key] = $uta['fields'][$key];
+ if (empty($postdata[$key])) {
+ $user_attributes[$key] = $uta['fields'][$key];
+ } else {
+ $user_attributes[$key] = $postdata[$key];
+ }
}
$user_attributes[$unique_attr] = $postdata[$unique_attr];