Software: Apache. PHP/5.5.15 uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 SYSTEM Safe-mode: OFF (not secure) C:\cumbreclima\wp-includes\ drwxrwxrwx |
Viewing file: Select action/file-type: get_blog_count(), 'users' => get_user_count(), ); return $stats; } /** * Get the admin for a domain/path combination. * * @since MU 1.0 * * @param string $sitedomain Optional. Site domain. * @param string $path Optional. Site path. * @return array The network admins */ function get_admin_users_for_domain( $sitedomain = '', $path = '' ) { global $wpdb; if ( ! $sitedomain ) $site_id = $wpdb->siteid; else $site_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE domain = %s AND path = %s", $sitedomain, $path ) ); if ( $site_id ) return $wpdb->get_results( $wpdb->prepare( "SELECT u.ID, u.user_login, u.user_pass FROM $wpdb->users AS u, $wpdb->sitemeta AS sm WHERE sm.meta_key = 'admin_user_id' AND u.ID = sm.meta_value AND sm.site_id = %d", $site_id ), ARRAY_A ); return false; } /** * Get one of a user's active blogs * * Returns the user's primary blog, if they have one and * it is active. If it's inactive, function returns another * active blog of the user. If none are found, the user * is added as a Subscriber to the Dashboard Blog and that blog * is returned. * * @since MU 1.0 * * @param int $user_id The unique ID of the user * @return object The blog object */ function get_active_blog_for_user( $user_id ) { global $wpdb; $blogs = get_blogs_of_user( $user_id ); if ( empty( $blogs ) ) return null; if ( !is_multisite() ) return $blogs[$wpdb->blogid]; $primary_blog = get_user_meta( $user_id, 'primary_blog', true ); $first_blog = current($blogs); if ( false !== $primary_blog ) { if ( ! isset( $blogs[ $primary_blog ] ) ) { update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id ); $primary = get_blog_details( $first_blog->userblog_id ); } else { $primary = get_blog_details( $primary_blog ); } } else { //TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog? add_user_to_blog( $first_blog->userblog_id, $user_id, 'subscriber' ); update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id ); $primary = $first_blog; } if ( ( ! is_object( $primary ) ) |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]-- |