X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=user_add.php;fp=user_add.php;h=0cd71b0a48d0c510912a5f42ba70127209e8bf3a;hb=392a83f0d6d4cc2a9296bb4175345412ebbc125a;hp=83f3bbcb2408fdf74f6713032691556c47216054;hpb=6ec11c42ae150bf58d54aa9b64600156e0a608f0;p=timetracker.git diff --git a/user_add.php b/user_add.php index 83f3bbcb..0cd71b0a 100644 --- a/user_add.php +++ b/user_add.php @@ -215,11 +215,7 @@ if ($request->isPost()) { // Insert user custom fields if we have them. $result = true; if ($user_id && $custom_fields && $custom_fields->userFields) { - foreach($userCustomFields as $userField) { - if (!$result) break; - $result = true; // TODO: replace this with a function call that inserts a field. - // Perhaps the entire block should be in the function call? - } + $result = $custom_fields->insertEntityFields(CustomFields::ENTITY_USER, $user_id, $userCustomFields); } if ($user_id && $result) {