[wp-trac] [WordPress Trac] #16297: User admin shouldn't kick in if not multisite

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 19 07:58:11 UTC 2011


#16297: User admin shouldn't kick in if not multisite
------------------------------------+------------------
 Reporter:  nacin                   |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.1
Component:  Network Admin           |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by nacin):

 Actually, the lines in question are:
 {{{
 // 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.
 if ( is_multisite() && !get_active_blog_for_user($user->id) )
         $redirect_to = user_admin_url();
 elseif ( !is_multisite() && !$user->has_cap('read') )
         $redirect_to = user_admin_url();
 elseif ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) ||
 $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) )
         $redirect_to = admin_url('profile.php');
 }}}

 Lines three and four seem functionally equivalent when the multisite check
 is reversed. So maybe both lines need to be removed, as the global
 dashboard was never designed to work outside of multisite.

 Will want feedback from ryan on this.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16297#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list