X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..5aa86a9053fb0fa15846bb60aac2fb8fdfff524a:/wp-admin/ms-users.php diff --git a/wp-admin/ms-users.php b/wp-admin/ms-users.php index 594406ac..5b4f1c52 100644 --- a/wp-admin/ms-users.php +++ b/wp-admin/ms-users.php @@ -9,370 +9,6 @@ require_once( './admin.php' ); -if ( !is_multisite() ) - wp_die( __( 'Multisite support is not enabled.' ) ); - -if ( ! current_user_can( 'manage_network_users' ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); - -$title = __( 'Users' ); -$parent_file = 'ms-admin.php'; - -add_contextual_help($current_screen, - '

' . __('This table shows all users across the network and the sites to which they are assigned.') . '

' . - '

' . __('Hover over any user on the list to make the edit links appear. The Edit link on the left will take you to his or her Edit User profile page; the Edit link on the right by any site name goes to an Edit Site screen for that site.') . '

' . - '

' . __('You can also go to the user’s profile page by clicking on the individual username.') . '

' . - '

' . __('You can sort the table by clicking on any of the bold headings and switch between list and excerpt views by using the icons in the upper right.') . '

' . - '

' . __('The bulk action will permanently delete selected users, or mark/unmark those selected as spam. Spam users will have posts removed and will be unable to sign up again with the same email addresses.') . '

' . - '

' . __('Add User will add that person to this table and send them an email.') . '

' . - '

' . __('Users who are signed up to the network without a site are added as subscribers to the main or primary dashboard site, giving them profile pages to manage their accounts. These users will only see Dashboard and My Sites in the main navigation until a site is created for them.') . '

' . - '

' . __('You can make an existing user an additional super admin by going to the Edit User profile page and checking the box to grant that privilege.') . '

' . - '

' . __('For more information:') . '

' . - '

' . __('Network Users Documentation') . '

' . - '

' . __('Support Forums') . '

' -); - -wp_enqueue_script( 'admin-forms' ); - -require_once( './admin-header.php' ); - -if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['action'] ) ) { - ?> -

- -

- users}"; - - if ( !empty( $like_s ) ) { - $query .= " WHERE user_login LIKE '%$like_s%' OR user_email LIKE '%$like_s%'"; - } - - $order_by = isset( $_GET['sortby'] ) ? $_GET['sortby'] : 'id'; - if ( $order_by == 'email' ) { - $query .= ' ORDER BY user_email '; - } elseif ( $order_by == 'login' ) { - $query .= ' ORDER BY user_login '; - } elseif ( $order_by == 'name' ) { - $query .= ' ORDER BY display_name '; - } elseif ( $order_by == 'registered' ) { - $query .= ' ORDER BY user_registered '; - } else { - $order_by = 'id'; - $query .= ' ORDER BY ID '; - } - - $order = ( isset( $_GET['order'] ) && 'DESC' == $_GET['order'] ) ? 'DESC' : 'ASC'; - $query .= $order; - - $total = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT(ID)', $query ) ); - - $query .= " LIMIT " . intval( ( $pagenum - 1 ) * $per_page) . ", " . intval( $per_page ); - - $user_list = $wpdb->get_results( $query, ARRAY_A ); - - $num_pages = ceil( $total / $per_page ); - $page_links = paginate_links( array( - 'base' => add_query_arg( 'paged', '%#%' ), - 'format' => '', - 'prev_text' => __( '«' ), - 'next_text' => __( '»' ), - 'total' => $num_pages, - 'current' => $pagenum - )); - - if ( empty( $_GET['mode'] ) ) - $mode = 'list'; - else - $mode = esc_attr( $_GET['mode'] ); - - ?> -
- -

- - ' . __( 'Search results for “%s”' ) . '', esc_html( $s ) ); - ?> -

- -
- -
- -
- -
-
- - - -
- - -
- ' . __( 'Displaying %s–%s of %s' ) . '%s', - number_format_i18n( ( $pagenum - 1 ) * $per_page + 1 ), - number_format_i18n( min( $pagenum * $per_page, $total ) ), - number_format_i18n( $total ), - $page_links - ); echo $page_links_text; ?> -
- - - -
-
- - 'display name' - $users_columns = array( - 'id' => __( 'ID' ), - 'login' => __( 'Username' ), - 'name' => __( 'Name' ), - 'email' => __( 'E-mail' ), - 'registered' => _x( 'Registered', 'user' ), - 'blogs' => __( 'Sites' ) - ); - $users_columns = apply_filters( 'wpmu_users_columns', $users_columns ); - ?> - - - - - $column_display_name) { - $column_link = " $order2, 'paged' => $pagenum, 'sortby' => $column_id ), remove_query_arg( array( 'action', 'updated' ), $_SERVER['REQUEST_URI'] ) ) ); - $column_link .= "'>{$column_display_name}"; - $col_url .= ''; - } - echo $col_url; ?> - - - - - - - - - - 'site-spammed', 'deleted' => 'site-deleted' ); - - foreach ( $status_list as $status => $col ) { - if ( $user[$status] ) - $class = $col; - } - - ?> - - $column_display_name ) : - switch( $column_name ) { - case 'id': ?> - - - ID == $user['ID'] ) ? 'profile.php' : 'user-edit.php?user_id=' . $user['ID']; - ?> - - - - - - g:i:s a'; - ?> - - - - - - - - - - - - - -
- - ' . ( $column_id == 'blogs' ? $column_display_name : $column_link ) . '
- -
- - - - - -
-
- - - | - -
-
- $val ) { - $path = ( $val->path == '/' ) ? '' : $val->path; - echo '' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . ''; - echo ' '; - - // Edit - echo '' . __( 'Edit' ) . ' | '; - - // View - echo 'userblog_id, 'spam' ) == 1 ) - echo 'style="background-color: #faa" '; - echo 'href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . ''; - - echo '
'; - } - } - ?> -
- -
- $page_links_text
"; - ?> - -
- - -
-
-
- - - - - -
-

-
- - - - - - - - - - - - -
-

- -

-
-
- - -