Make WordPress Core


Ignore:
Timestamp:
06/22/2011 07:45:28 PM (15 years ago)
Author:
ryan
Message:

Fix handing of super admins that don't have a blog in get_dashboard_url() and login. Props nacin. fixes #17829

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r18254 r18328  
    23032303
    23042304        $blogs = get_blogs_of_user( $user_id );
    2305         if ( empty($blogs) ) {
     2305        if ( ! is_super_admin() && empty($blogs) ) {
    23062306                $url = user_admin_url( $path, $scheme );
    23072307        } elseif ( ! is_multisite() ) {
    … …  
    23092309        } else {
    23102310                $current_blog = get_current_blog_id();
    2311                 if ( $current_blog  && in_array($current_blog, array_keys($blogs)) ) {
     2311                if ( $current_blog  && ( is_super_admin( $user_id ) || in_array( $current_blog, array_keys( $blogs ) ) ) ) {
    23122312                        $url = admin_url( $path, $scheme );
    23132313                } else {
Note: See TracChangeset for help on using the changeset viewer.