Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_add_user_role( $user_id, $role ) {
- if ( ! function_exists( 'wp_fusion' ) ) {
- return;
- }
- if ( 'enabled' == $role ) {
- wp_fusion()->user->user_register( $user_id );
- }
- }
- add_action( 'add_user_role', 'my_add_user_role', 10, 2 );
- function my_wpf_user_register( $post_data, $user_id ) {
- $post_data['user_email'] = get_user_meta( $user_id, 'company_email', true );
- return $post_data;
- }
- add_filter( 'wpf_user_register', 'my_wpf_user_register', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement