X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/6ec11c42ae150bf58d54aa9b64600156e0a608f0..392a83f0d6d4cc2a9296bb4175345412ebbc125a:/user_add.php 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) {