diff --git a/includes/core/class-permalinks.php b/includes/core/class-permalinks.php index f98442d4..5f3ce7e7 100644 --- a/includes/core/class-permalinks.php +++ b/includes/core/class-permalinks.php @@ -391,8 +391,6 @@ if ( ! class_exists( 'Permalinks' ) ) { $permalink_base = um_get_option('permalink_base'); - $full_name = preg_replace( '/\s+/', ' ', $first_name .' '. $last_name); // Remove double spaces - $user_in_url = ''; $full_name = str_replace("'", "", $full_name ); diff --git a/includes/core/um-actions-register.php b/includes/core/um-actions-register.php index 5412a7ad..bb5b7b01 100644 --- a/includes/core/um-actions-register.php +++ b/includes/core/um-actions-register.php @@ -336,4 +336,18 @@ UM()->user()->update_files( $files ); do_action( 'um_after_user_upload', $user_id, $files ); } - } \ No newline at end of file + } + + /** + * Update user Full Name + * + * @profile name update + * + * @param $user_id + * @param $args + */ + function um_registration_set_profile_full_name( $user_id, $args ) { + do_action( 'um_update_profile_full_name', $args ); + } + + add_action( 'um_registration_set_extra_data', 'um_registration_set_profile_full_name', 10, 2 ); \ No newline at end of file