I just realized when looking into the result for a user on a machine, that OAv2 writes "True", "False", "Wahr", "Falsch" into sys_sw_user.user_password_changeable depending on the language the system which was audited is running.
That is surely no bug but perhaps something to improve because it would make evaluating the results via sql quite easier if boolean values would appear all in the same language (english)
Is there a way to improve the script that it already sends true or false via xml or if not
perhaps a function which converts expected Boolean Values into an english string could make sense. Perhaps something like: [code] function convertboolStringToEnglish ($input) { $fsReturn = $input; if (strtolower($input)=="wahr") { $fsReturn = "True"; } if (strtolower($input) == "falsch") { $fsReturn = "False"; } return $fsreturn; } [/code]
and then modifying the insert commands [code] $sql = "INSERT INTO sys_sw_user ( system_id, user_name, user_caption, user_sid, user_domain, user_disabled, user_full_name, user_password_changeable, user_password_expires, user_password_required, user_status, user_type, timestamp, first_timestamp ) VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,? )"; $data = array("$details->system_id", "$input->user_name", "$input->user_caption", "$input->user_sid", "$input->user_domain", "$input->user_disabled", "$input->user_full_name", "$this->convertboolStringToEnglish($input->user_password_changeable)", "$input->user_password_expires", "$input->user_password_required", "$input->user_status", "$input->user_type", "$details->timestamp", "$details->timestamp"); [/code]
|