DEV: plugin API to register User custom field types

DEV: plugin API to register User custom field types

diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb
index 7507760..4d7cbba 100644
--- a/lib/plugin/instance.rb
+++ b/lib/plugin/instance.rb
@@ -373,6 +373,13 @@ class Plugin::Instance
     end
   end
 
+  # Applies to all sites in a multisite environment. Ignores plugin.enabled?
+  def register_user_custom_field_type(name, type)
+    reloadable_patch do |plugin|
+      ::User.register_custom_field_type(name, type)
+    end
+  end
+
   def register_seedfu_fixtures(paths)
     paths = [paths] if !paths.kind_of?(Array)
     SeedFu.fixture_paths.concat(paths)

GitHub sha: 39a427ef

This commit has been mentioned on Discourse Meta. There might be relevant details there: