CRM-11912 backport of UFMatch create & hook