Bulk Update User-Id field

By: Helen Clarke | Asked: 06/03/2025
ForumsCategory: General questionsBulk Update User-Id field
Helen Clarke asked 2 weeks ago

Hi,

 

I have a form which generates a Custom Post type.  There was an issue with this not repopulating the user-id field when edited through ACF. I now have the code fix for this..

add_filter('frm_acf_supported_field_types', 'acf_map_ff_userid');
function acf_map_ff_userid( $field_types ) {
	$field_types['user_id'][] = 'user';
	return $field_types;
}

But the problem I have is that the user-id field is empty for the majority of 400 records. Does anyone know of a quick way to update this field without manually updating each record.

Thanks,

Helen

 

2 Answers
Rob LeVineRob LeVine Staff answered 2 weeks ago

When similar things have happened to me, I've written a small PHP script to fix the data. 

Helen Clarke replied 2 weeks ago

Thanks, I thought this was probably the case. Sadly my PHP skills aren't that strong.

Victor Font Staff answered 2 weeks ago

If you're adept with SQL, you can do this in PHPMyAdmin.

Helen Clarke replied 2 weeks ago

Thanks, yes that was what I was hoping to do. I'm not that adept but will see what I can muster.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right