diff --git a/includes/core/class-rewrite.php b/includes/core/class-rewrite.php index a8d66482..ccad3bb4 100644 --- a/includes/core/class-rewrite.php +++ b/includes/core/class-rewrite.php @@ -162,6 +162,13 @@ if ( ! class_exists( 'um\core\Rewrite' ) ) { if ( empty( $custom_meta ) ) { // Set default permalink base if custom meta is empty. $permalink_base = 'user_login'; + } else { + // Ignore username slug if custom meta slug exists. + $user_id = username_exists( um_queried_user() ); + $custom_permalink = get_user_meta( $user_id, 'um_user_profile_url_slug_' . $permalink_base, true ); + if ( ! empty( $custom_permalink ) && um_queried_user() !== $custom_permalink ) { + return false; + } } } diff --git a/readme.txt b/readme.txt index dfbe5c6c..f095ce3d 100644 --- a/readme.txt +++ b/readme.txt @@ -184,6 +184,7 @@ IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSI - Fixed: PHP notice while login form submission - Fixed: Email notifications HTML layout - Fixed: Default email notification body color + - Fixed: Ignore username slug when custom meta slug exists when parse user from query * Templates required update: