Company and Group
-
Hi,
Thank you for an awesome plugin.
So I have a b2b site with a company role setup where each “customer” belongs to a company. The company admin can add the employees to the company by a simple add user form.
What I would like to do is to add the created user to a group with the same name as the company. Essentially like the join_group thing but in this case its an admin user that creates the user.
The php for the current action is:(Where $this->company is defined to the admin users company)
add_user_meta($user_id, 'wcb2brp_company', $this->company); add_user_meta($user_id, 'wcb2brp_company_user_role', filter_input(INPUT_POST, 'wcb2brp_role')); update_user_meta($user_id, 'wcb2brp_company_user_status', 'active'); wcb2brp_add_update_company_capabilities($user_id);So what I would like is for it to grab the company name and make the created user join the group.
Any help would be great!
The topic ‘Company and Group’ is closed to new replies.