Merge pull request #10439 from shivapoudel/user-list
Tweaks API list table User column
This commit is contained in:
commit
b9c423570f
|
@ -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>';
|
||||
if ( current_user_can( 'edit_user', $user->ID ) ) {
|
||||
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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue