Problem:
I want a user to register and to fill in to which company it belongs. The company is a custom post type. It may be a new company, or maybe already in the database. How do I connect the user to the company and the company has some taxonomies. When the user registers himself for the first time, I want it to select the taxonomie in the register form so if the company is new, it can be created with the right taxonomy. I know how I can make checkboxes but I want the register form to get the possible taxonomies from wordpress.
Solution:
Since wordpress users are not a custom post type, so you can not connect user with custom post type "Company" directly, and custom taxonomy does not support WordPress user.
in your case, I suggest you setup another custom post type, for example "Member", use it as intermediate between "company" and user:
1) Each user can create only one post in "Member" post type
2) setup one-to-many relationship between post type "Company" and "Member"
3) After user login into your website, display a page with post view, lists all "Company" posts,
If user can find his own company, show a child post form link to create "Member" post.
If his company is not in company list, show a post form for creating "Company" post.
Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/