Making WordPress.org

Changeset 2318


Ignore:
Timestamp:
01/19/2016 04:14:13 AM (11 years ago)
Author:
dd32
Message:

WordPress.org SSO: If the user requesting the page is already logged in has specified a redirect_to url, respect that instead of redirecting to the support profile.
This fixes the Trac new ticket links.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/wporg-sso/wp-plugin.php

    r2317 r2318  
    159159                                return;
    160160                        }
    161                         $this->_safe_redirect( 'https://wordpress.org/support/profile/' . wp_get_current_user()->user_nicename );
     161
     162                        if ( !empty( $_GET['redirect_to'] ) ) {
     163                                $this->_safe_redirect( wp_unslash( $_GET['redirect_to'] ) );
     164                        } else {
     165                                $this->_safe_redirect( 'https://wordpress.org/support/profile/' . wp_get_current_user()->user_nicename );
     166                        }
    162167                }
    163168        }
Note: See TracChangeset for help on using the changeset viewer.