apply_filters( 'um_registration_user_role', $user_role, $args, $form_data ) → {string}
Filters change user role on registration process
Parameters:
Name | Type | Description |
---|---|---|
$user_role |
string | User role. |
$args |
array | Registration data. |
$form_data |
array | UM form data. Since 2.6.7 |
- Since:
- 2.0
- Source:
Returns:
User role.
- Type
- string
Example
function my_registration_user_role( $user_role, $args, $form_data ) {
// your code here
return $user_role;
}
add_filter( 'um_registration_user_role', 'my_registration_user_role', 10, 3 );