Docly

Actions/Filters for Developers

Estimated reading: 4 minutes 112 views

Organization Toolkit provides the following Actions and Filters that allow Developers to hook into its functionality. These can be used to create custom integrations or help with automation with your wider system.

Filter: org_toolkit_imported_users_pre_import

Description: Allows you to manipulate an array of imported users from a CSV import.

				
					apply_filters( 'org_toolkit_imported_users_pre_import', $imported_users );

				
			

Action: org_toolkit_new_imported_user

Description: Fires when each new user is added via CSV import, allowing you to carry out custom functionality afterwards.

				
					do_action('org_toolkit_new_imported_user',$user_id,$user_data);
				
			

Action: org_toolkit_registration_form_registrant

Description: Fires when each new user is added after using a registration form, allowing you to carry out custom functionality afterwards. Also includes details of the access code used, which may be useful for logging or reporting purposes.

				
					do_action('org_toolkit_registration_form_registrant',$user_id,$account_type,$access_code_details);
				
			

Action: org_toolkit_access_code_used

Description: Fires whenever an access code is used and contains information on whether or not it was valid

				
					do_action('org_toolkit_access_code_used',$reg_form_id, $entered_code, $code_status, $access_code_details);

				
			

Filter: org_toolkit_regform_profile_fields_public

Description: Allows you to customise the user profile fields that the Organization Toolkit allows you to capture in the frontend of your platform.

Available in Organization Toolkit version 1.4.

				
					apply_filters('org_toolkit_regform_profile_fields_public',$fields);

				
			

Filter: org_toolkit_regform_profile_fields_admin

Description: Allows you to customise the user profile fields that the Organization Toolkit allows you to capture in the backend of your platform.

Available in Organization Toolkit version 1.4.

				
					apply_filters('org_toolkit_regform_profile_fields_admin',$fields);

				
			

Action: org_toolkit_registration_custom_actions

Description: Allows you to hook into the registration form process and carry out additional actions based on a number of available parameters.

Available in Organization Toolkit version 1.4.

				
					do_action('org_toolkit_registration_custom_actions',$user_id,$reg_form,$verified_code,$postdata);

				
			

Action: org_toolkit_reg_form_before_user_fields

Description: Allows you to add custom content to the registration forms above the user fields.

Available in Organization Toolkit version 1.4.

				
					do_action('org_toolkit_reg_form_before_user_fields',$post->ID,$post);
				
			

Action: org_toolkit_reg_form_after_user_fields

Description: Allows you to add custom content to the registration forms below the user fields.

Available in Organization Toolkit version 1.4.

				
					do_action('org_toolkit_reg_form_after_user_fields',$post->ID,$post);				
			

Action: org_toolkit_reg_form_end_of_form

Description: Allows you to add custom content at the end of the registration form.

Available in Organization Toolkit version 1.4.

				
					do_action('org_toolkit_reg_form_end_of_form',$post->ID,$post)				
			

Filter: org_toolkit_allow_logged_in_registrants

Description: Allows you to disable access to registration forms for users who are already logged in. Instead of seeing the form they will be shown a button with an option to log out.

Available in Organization Toolkit version 1.4.

				
					apply_filters('org_toolkit_allow_logged_in_registrants',true);				
			

Leave a Comment

CONTENTS