WordPress.org

Make WordPress Core

Changeset 10705


Ignore:
Timestamp:
03/04/09 20:34:52 (5 years ago)
Author:
ryan
Message:

Check admin_url() when redirecting to profile. Props drossy. fixes #8493

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-login.php

    r10634 r10705  
    436436    if ( !is_wp_error($user) ) { 
    437437        // If the user can't edit posts, send them to their profile. 
    438         if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) ) 
     438        if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' || $redirect_to == admin_url() ) ) 
    439439            $redirect_to = admin_url('profile.php'); 
    440440        wp_safe_redirect($redirect_to); 
Note: See TracChangeset for help on using the changeset viewer.