Changeset 7317
- Timestamp:
- 03/15/2008 08:27:16 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r7307 r7317 522 522 global $wp_roles; 523 523 524 $current_user = wp_get_current_user(); 525 524 526 if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) ) 525 527 $user_object = new WP_User( (int) $user_object ); … … 534 536 $numposts = get_usernumposts( $user_object->ID ); 535 537 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 536 $edit = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) ); 538 if ($current_user->ID == $user_object->ID) { 539 $edit = 'profile.php'; 540 } else { 541 $edit = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) ); 542 } 537 543 $edit = "<a href=\"$edit\">$user_object->user_login</a>"; 538 544 } else {
Note: See TracChangeset
for help on using the changeset viewer.