wwtdev04
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Theme My Login] registration redirection wrong in my WP setupYes, But in my case, Registration form url is Register and when form fails, it send to page Failed-Register
Forum: Plugins
In reply to: [Theme My Login] registration redirection wrong in my WP setupThis code is under
template_redirectfunction in class-theme-my-login.phpcase 'register' : if ( ! get_option( 'users_can_register' ) ) { $redirect_to = site_url( 'wp-login.php?registration=disabled' ); wp_redirect( $redirect_to ); exit; } $user_login = ''; $user_email = ''; if ( $http_post ) { if ( 'email' == $this->get_option( 'login_type' ) ) { $user_login = isset( $_POST['user_email'] ) ? $_POST['user_email'] : ''; } else { $user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : ''; } $user_email = isset( $_POST['user_email'] ) ? $_POST['user_email'] : ''; $this->errors = register_new_user( $user_login, $user_email ); if ( ! is_wp_error( $this->errors ) ) { $redirect_to = ! empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : site_url( 'wp-login.php?checkemail=registered' ); wp_safe_redirect( $redirect_to ); exit; } } break;Here, $_POST[‘redirect_to’] = “mysite.com/wp-admin” but when i try and register with existing user’s email, then condition
! is_wp_error( $this->errors )is false and it redirects tomysite.com/registerwhere as I want it to redirect tomysite.com/user/loginas I have “Registration” and “login” form on same page.
Viewing 2 replies - 1 through 2 (of 2 total)