WordPress.org

Make WordPress Core


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-includes/pluggable.php

    r15682 r15746  
    8282
    8383    if ( ! $user = wp_validate_auth_cookie() ) {
    84          if ( is_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
     84         if ( is_blog_admin() || is_network_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
    8585            wp_set_current_user(0);
    8686            return false;
     
    776776    }
    777777
    778     if ( $user_id = wp_validate_auth_cookie( '', apply_filters( 'auth_redirect_scheme', '' ) ) ) {
     778    if ( is_user_admin() )
     779        $scheme = 'logged_in';
     780    else
     781        $scheme = apply_filters( 'auth_redirect_scheme', '' );
     782
     783    if ( $user_id = wp_validate_auth_cookie( '',  $scheme) ) {
    779784        do_action('auth_redirect', $user_id);
    780785
Note: See TracChangeset for help on using the changeset viewer.