Ticket #1240: wp-login-redirect.diff
File wp-login-redirect.diff, 601 bytes (added by , 20 years ago) |
---|
-
wp-login.php
182 182 if ($user_login && $user_pass) { 183 183 $user = new WP_User($user_login); 184 184 // If the user can't edit posts, send them to their profile. 185 if ( ! $user->has_cap('edit_posts'))185 if (!$user->has_cap('edit_posts') && (empty($_REQUEST['redirect_to']) || $_REQUEST['redirect_to'] == 'wp-admin/')) 186 186 $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; 187 187 188 188 if ( wp_login($user_login, $user_pass, $using_cookie) ) {