Commit cd170893 authored by lechuck's avatar lechuck Committed by agata

forced https on buddypress login redirect

parent 91e0deed
...@@ -327,7 +327,7 @@ function bp_core_login_redirect( $redirect_to, $redirect_to_raw, $user ) { ...@@ -327,7 +327,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'] ) ) { 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());
} }
/** /**
...@@ -337,8 +337,9 @@ function bp_core_login_redirect( $redirect_to, $redirect_to_raw, $user ) { ...@@ -337,8 +337,9 @@ function bp_core_login_redirect( $redirect_to, $redirect_to_raw, $user ) {
* *
* @param string $value URL to redirect to. * @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 ); 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