Honor redirect_to for logged in users. Props DD32. fixes #6385

git-svn-id: http://svn.automattic.com/wordpress/trunk@7524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-26 07:43:52 +00:00
parent 95672cb4a2
commit 5d7980a249

View File

@ -341,10 +341,10 @@ break;
case 'login' :
default:
if ( !isset( $_REQUEST['redirect_to'] ) || is_user_logged_in() )
$redirect_to = 'wp-admin/';
else
if ( isset( $_REQUEST['redirect_to'] ) )
$redirect_to = $_REQUEST['redirect_to'];
else
$redirect_to = 'wp-admin/';
$user = wp_signon();