switch ($action) { case 'submit': Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10); //Debug::setVerbosity(11); if (isset($user_data['id']) and $user_data['id'] != '') { $udf->setId($user_data['id']); } $udf->setCompany($current_company->getId()); $udf->setTitle($user_data['title_id']); $udf->setCity($user_data['city']); $udf->setCountry($user_data['country']); $udf->setProvince($user_data['province']); $udf->setWorkPhone($user_data['work_phone']); $udf->setWorkPhoneExt($user_data['work_phone_ext']); $udf->setWorkEmail($user_data['work_email']); $udf->setPayPeriodSchedule($user_data['pay_period_schedule_id']); $udf->setPolicyGroup($user_data['policy_group_id']); $udf->setCurrency($user_data['currency_id']); if ($permission->Check('permission', 'edit') and isset($user_data['permission_control_id'])) { $udf->setPermissionControl($user_data['permission_control_id']); } $udf->setHireDate($user_data['hire_date']); $udf->setEmployeeNumber($user_data['employee_number']); $udf->setDefaultBranch($user_data['default_branch_id']); $udf->setDefaultDepartment($user_data['default_department_id']); $udf->setLanguage($user_data['language']); if ($user_data['language'] === 'en') { $udf->setDateFormat($user_data['date_format']); } else { $udf->setDateFormat($user_data['other_date_format']); }