'rows_prepare' => function($table,$sql) {
$fields = (empty($table->fields_only) ? array_keys($table->fields()) : $table->fields_only);
$table->replace_fields($fields);
+ #bye(array_keys($table->fields));
$GLOBALS['LDAP_CONN']->prepare($sql,['attrs'=>$fields]); return $GLOBALS['LDAP_CONN'];
},
if (!$row) return [];
$fields = (empty($table->fields_only) ? array_keys($table->fields()) : $table->fields_only);
$row = $GLOBALS['LDAP_CONN']->ar_filter_keys($row,$fields);
+ # NB 29.05.26: Add missing
+ foreach(array_keys($table->fields()) as $f) {
+ if (!isset($row[$f])) $row[$f] = '';
+ }
$table->fields_only($row,$fields); # reorder by fields
return $row;
},