mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- Fixed: Ignore username slug when custom meta slug exists when parse user from query
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user