Skip to:
Content

BuddyPress.org

Ticket #4822: ssl_login_patch.diff

File ssl_login_patch.diff, 637 bytes (added by will_c, 9 years ago)
  • buddypress/bp-core/bp-core-filters.php

     
    170170
    171171        // Only modify the redirect once the user is logged in
    172172        if ( !is_a( $user, 'WP_User' ) ) {
     173                // Create redirect if none exits
     174                if ( false === strpos( wp_get_referer(), 'wp-login.php' ) && false === strpos( wp_get_referer(), 'activate' ) && empty( $_REQUEST['nr'] ) && empty( $redirect_to ) ) {
     175                        $redirect_to = wp_get_referer();
     176                }
    173177                return $redirect_to;
    174178        }
    175179