WordPress.org

Make WordPress Core

Changeset 15746 for trunk/wp-login.php


Ignore:
Timestamp:
10/07/2010 07:34:18 PM (11 years ago)
Author:
ryan
Message:

First pass of user admin. Network admin and screen cleanups. see #14696

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r15735 r15746  
    573573<?php       exit;
    574574        }
    575         // If the user can't edit posts, send them to their profile.
    576         if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) )
     575
     576        // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
     577        if ( is_multisite() && !get_active_blog_for_user($user->id) )
     578            $redirect_to = user_admin_url();
     579        elseif ( !is_multisite() && !$user->has_cap('read') )
     580            $redirect_to = user_admin_url();
     581        elseif ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) )
    577582            $redirect_to = admin_url('profile.php');
    578583        wp_safe_redirect($redirect_to);
Note: See TracChangeset for help on using the changeset viewer.