Matt C.
Well-known member
Is it possible to insert a regex impression into the database? Trying to import a custom user field with a regex expression attached. I don't get any server errors, but the regex expression will not show up in the custom user field settings in the ACP.
Anyone know of a solution?
Code:
$this->db()->insertBulk('xf_user_field', [
[
'field_id' => 'ah_nintendo',
'display_group' => 'contact',
'display_order' => 921,
'field_type' => 'textbox',
'field_choices' => '',
'match_type' => 'regex',
'match_params' => '^SW-\d{4}-\d{4}-\d{4}$',
'max_length' => 0,
'viewable_profile' => 0,
'viewable_message' => 0,
'display_template' => '',
'wrapper_template' => ''
]
], 'field_id');
Anyone know of a solution?