[wp-trac] [WordPress Trac] #31583: Translate or cut user_nicename
WordPress Trac
noreply at wordpress.org
Thu Mar 12 14:46:37 UTC 2015
#31583: Translate or cut user_nicename
--------------------------+------------------------------
Reporter: moonkir | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 4.1.1
Severity: normal | Resolution:
Keywords: close | Focuses: administration
--------------------------+------------------------------
Changes (by SergeyBiryukov):
* keywords: => close
* component: General => Users
Comment:
> 2.1. View DataBase table wp_users
> collumn user_nicename
> before 4.1
> user_nicename - Иван Иванов
> after 4.1
> user_nicename - i-ivanov
I can't reproduce that. `user_nicename` is used in author archives URL and
is based on a sanitized version of `user_login`, not on `display_name`.
`user_login` cannot contain Cyrillic characters by default, so
`user_nicename` does not either.
Even with a plugin like [https://wordpress.org/plugins/allow-cyrillic-
usernames/ Allow Cyrillic Usernames], `user_nicename` contains a URL-
encoded username (`%d0%b8%d0%b2%d0%b0%d0%bd-%d0%b8%d0%b2%d0%b0%d0%bd%`),
not raw Cyrillic.
[29819] is the only change in 4.1 that might be relevant here, but it does
not affect core behavior. You probably have a plugin or a function
changing the default user registration sequence somewhere on your install.
> Search in cyrillic fails because the name in column user_nicename was
translated
No, it fails because `display_name` is not included in the list of fields
to search by default. It can be added with the
[http://codex.wordpress.org/Plugin_API/Filter_Reference/user_search_columns
user_search_columns] filter:
{{{
function wp31583_add_display_name_to_user_search_columns( $search_columns
) {
$search_columns[] = 'display_name';
return $search_columns;
}
add_filter( 'user_search_columns',
'wp31583_add_display_name_to_user_search_columns' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31583#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list