Skip to content
Browse files

Add login_redirect filter. fixes #7002 for 2.6

git-svn-id: http://svn.automattic.com/wordpress/branches/2.6@8737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 3c49663 commit cc67b7a91c67c69c649c4c1684df65a91fe0a1fb ryan committed Aug 26, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 wp-login.php
View
2 wp-login.php
@@ -424,6 +424,8 @@ function register_new_user($user_login, $user_email) {
$user = wp_signon('', $secure_cookie);
+ $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
+
if ( !is_wp_error($user) ) {
// If the user can't edit posts, send them to their profile.
if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )

0 comments on commit cc67b7a

Please sign in to comment.
Something went wrong with that request. Please try again.