summaryrefslogtreecommitdiffstats
path: root/lib/api/kolab_api_service_user.php
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-01 02:37:35 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-01 02:37:35 +0200
commit687f5e1088d27fe5d8aad7478254f4281f347a84 (patch)
tree3028413b3b54402309d2dc440d82b5373c69ed58 /lib/api/kolab_api_service_user.php
parent5c72e4a7010e681dc18cae6f8ade0225cc21c53b (diff)
downloadwebadmin-687f5e1088d27fe5d8aad7478254f4281f347a84.tar.gz
Attributes posted and also "static" forms should be preserved (as posted)
Diffstat (limited to 'lib/api/kolab_api_service_user.php')
-rw-r--r--lib/api/kolab_api_service_user.php12
1 files changed, 10 insertions, 2 deletions
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];