WordPress.org

Make WordPress Core

Ticket #30598: 30598.2.diff

File 30598.2.diff, 469 bytes (added by jeremyfelt, 4 years ago)
  • src/wp-login.php

     
    830830                                $redirect_to = get_dashboard_url( $user->ID );
    831831                        elseif ( !$user->has_cap('edit_posts') )
    832832                                $redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url();
     833
     834                        wp_redirect( $redirect_to );
     835                        exit();
    833836                }
    834837                wp_safe_redirect($redirect_to);
    835838                exit();