WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/30/2010 08:34:54 PM (10 years ago)
Author:
ryan
Message:

Network Admin, first pass. see #14435

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r15135 r15481  
    8585        wp_update_user( get_object_vars( $user ) );
    8686        delete_option( $current_user->ID . '_new_email' );
    87         wp_redirect( add_query_arg( array('updated' => 'true'), admin_url( 'profile.php' ) ) );
     87        wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) );
    8888        die();
    8989    }
    9090} elseif ( is_multisite() && IS_PROFILE_PAGE && !empty( $_GET['dismiss'] ) && $current_user->ID . '_new_email' == $_GET['dismiss'] ) {
    9191    delete_option( $current_user->ID . '_new_email' );
    92     wp_redirect( add_query_arg( array('updated' => 'true'), admin_url( 'profile.php' ) ) );
     92    wp_redirect( add_query_arg( array('updated' => 'true'), self_admin_url( 'profile.php' ) ) );
    9393    die();
    9494}
     
    139139        delete_user_meta( $user_id, $blog_prefix . 'capabilities' );
    140140
    141     if ( is_multisite() && !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) )
     141    if ( is_multisite() && is_network_admin() & !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) )
    142142        empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id );
    143143}
     
    156156    wp_die(__('You do not have permission to edit this user.'));
    157157
    158 include ('admin-header.php');
     158include (ABSPATH . 'wp-admin/admin-header.php');
    159159?>
    160160
     
    178178<h2><?php echo esc_html( $title ); ?></h2>
    179179
    180 <form id="your-profile" action="<?php echo esc_url( admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>>
     180<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>>
    181181<?php wp_nonce_field('update-user_' . $user_id) ?>
    182182<?php if ( $wp_http_referer ) : ?>
     
    246246?>
    247247</select>
    248 <?php if ( is_multisite() && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
     248<?php if ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && !isset($super_admins) ) { ?>
    249249<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.'); ?></label></p>
    250250<?php } ?>
     
    308308    if ( $new_email && $new_email != $current_user->user_email ) : ?>
    309309    <div class="updated inline">
    310     <p><?php printf( __('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_email['newemail'], esc_url( admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) ) ); ?></p>
     310    <p><?php printf( __('There is a pending change of your e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_email['newemail'], esc_url( self_admin_url( 'profile.php?dismiss=' . $current_user->ID . '_new_email' ) ) ); ?></p>
    311311    </div>
    312312    <?php endif; ?>
     
    399399</script>
    400400<?php
    401 include('./admin-footer.php');
    402 ?>
     401include( ABSPATH . 'wp-admin/admin-footer.php');
     402?>
Note: See TracChangeset for help on using the changeset viewer.