diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-12-05 15:29:53 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-12-05 15:29:53 +0000 |
| commit | 3055390b6908c8335d154dd8e4dfa374b7fa3783 (patch) | |
| tree | ed05c0516b4cf40831ae49a747946fcfd9162b7f /wp-inst/wp-admin/user-edit.php | |
| parent | fba798a103256f5f400cb1a1dcb9cc5b45cf8166 (diff) | |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@461 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/user-edit.php')
| -rw-r--r-- | wp-inst/wp-admin/user-edit.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wp-inst/wp-admin/user-edit.php b/wp-inst/wp-admin/user-edit.php index 6489d6d..1cb1561 100644 --- a/wp-inst/wp-admin/user-edit.php +++ b/wp-inst/wp-admin/user-edit.php @@ -25,7 +25,7 @@ $errors = array(); // Only allow site admins to edit every user. if( is_site_admin() == false ) - if( false == $wpdb->get_var("SELECT user_id FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '".$wpdb->prefix."capabilities'") ) $errors['head'] = __('You do not have permission to edit this user.'); + if( $user_id != $current_user->ID ) $errors['head'] = __('You do not have permission to edit this user.'); switch ($action) { case 'switchposts': @@ -65,7 +65,7 @@ if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permi <p><strong><?php _e('User updated.') ?></strong></p> </div> <?php endif; ?> -<?php if ( count($errors) != 0 ) : ?> +<?php if ( count($errors) != 0 ) { ?> <div class="error"> <ul> <?php @@ -73,7 +73,7 @@ if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permi ?> </ul> </div> -<?php endif; ?> +<?php } else { ?> <div class="wrap"> <h2><?php _e('Edit User'); ?></h2> @@ -233,6 +233,7 @@ if( $invites_list != '' ) ?></table></div><?php } } +} break; } |
