By default display_name is user_login, no target for database change ;)

This commit is contained in:
Shiva Poudel 2016-02-28 21:04:57 +05:45
parent 22a8743e1d
commit 9dec203721
1 changed files with 2 additions and 4 deletions

View File

@ -115,13 +115,11 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table {
return '';
}
$user_name = ! empty( $user->data->display_name ) ? $user->data->display_name : $user->data->user_login;
if ( current_user_can( 'edit_user' ) ) {
return '<a href="' . esc_url( add_query_arg( array( 'user_id' => $user->ID ), admin_url( 'user-edit.php' ) ) ) . '">' . esc_html( $user_name ) . '</a>';
return '<a href="' . esc_url( add_query_arg( array( 'user_id' => $user->ID ), admin_url( 'user-edit.php' ) ) ) . '">' . esc_html( $user->display_name ) . '</a>';
}
return esc_html( $user_name );
return esc_html( $user->display_name );
}
/**