Commit bad8a1ce authored by lechuck's avatar lechuck Committed by lechuck

forced https on buddypress login redirect

parent c5735dc5
......@@ -341,7 +341,7 @@ function bp_core_login_redirect( $redirect_to, $redirect_to_raw, $user ) {
}
if ( false === strpos( wp_get_referer(), 'wp-login.php' ) && false === strpos( wp_get_referer(), 'activate' ) && empty( $_REQUEST['nr'] ) ) {
return wp_get_referer();
return str_replace('http://', 'https://', wp_get_referer());
}
/**
......@@ -351,8 +351,9 @@ function bp_core_login_redirect( $redirect_to, $redirect_to_raw, $user ) {
*
* @param string $value URL to redirect to.
*/
return apply_filters( 'bp_core_login_redirect_to', bp_get_root_domain() );
return str_replace('http://', 'https://', bp_get_root_domain());
}
add_filter( 'bp_login_redirect', 'bp_core_login_redirect', 10, 3 );
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment