Support

Account

Home Forums General Issues Set ACF user field with user logged Reply To: Set ACF user field with user logged

  • https://www.advancedcustomfields.com/resources/acf-load_field/

    
    add_filter('acf/load_field/key=field_123456', 'set_default_user', 20, 1);
    function set_default_user($field) {
      $field['default_value'] = get_current_user_id();
      return $field;
    }