Make WordPress Core


Ignore:
Timestamp:
01/08/2010 08:29:56 PM (15 years ago)
Author:
ryan
Message:

Use is_super_admin() instead of is_site_admin(). Props GIGALinux see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r12645 r12672  
    10261026        $errors->add('blogname',  __("That name is not allowed"));
    10271027    }
    1028     if( strlen( $blogname ) < 4 && !is_site_admin() ) {
     1028    if( strlen( $blogname ) < 4 && !is_super_admin() ) {
    10291029        $errors->add('blogname',  __("Blog name must be at least 4 characters"));
    10301030    }
     
    13061306    update_option( 'blog_public', $meta['public'] );
    13071307
    1308     if ( !is_site_admin() && get_usermeta( $user_id, 'primary_blog' ) == get_site_option( 'dashboard_blog', 1 ) )
     1308    if ( !is_super_admin() && get_usermeta( $user_id, 'primary_blog' ) == get_site_option( 'dashboard_blog', 1 ) )
    13091309        update_usermeta( $user_id, 'primary_blog', $blog_id );
    13101310
     
    15231523
    15241524    // Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
    1525     if ( !is_site_admin( $user->user_login ) && $user_id != 1 )
     1525    if ( !is_super_admin( $user->user_login ) && $user_id != 1 )
    15261526        $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $wpdb->base_prefix.'1_capabilities') );
    15271527
     
    19281928
    19291929function wordpressmu_authenticate_siteadmin( $user, $password = '' ) {
    1930     if( is_site_admin( $user->user_login ) == false && ( $primary_blog = get_usermeta( $user->user_id, "primary_blog" ) ) ) {
     1930    if( is_super_admin( $user->user_login ) == false && ( $primary_blog = get_usermeta( $user->user_id, "primary_blog" ) ) ) {
    19311931        $details = get_blog_details( $primary_blog );
    19321932        if( is_object( $details ) && $details->spam == 1 ) {
Note: See TracChangeset for help on using the changeset viewer.