Change user metadata on registration (show_admin_bar_front = false)

If you want to update meta on registration like this I think a better option would be to use the register_new_user hook with add_action. https://developer.wordpress.org/reference/hooks/register_new_user/

So something like:


add_action('register_new_user','my_update_meta',10,1);


function my_update_meta($user_id){

 update_user_meta($user_id, 'show_admin_bar_front', false);


}

If in doubt, hooks/filters/actions tend to be the best option for WordPress work.