Making WordPress.org


Ignore:
Timestamp:
09/24/2018 03:45:23 AM (6 years ago)
Author:
dd32
Message:

Login: Allow query parameters on the /logout route. This is needed to support the locale switcher, and future custom redirection locations.

See #3821.
Fixes #3823.

File:
1 edited

Legend:

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

    r7648 r7695  
    232232                                return;
    233233                            }
     234                        } else if ( is_user_logged_in() && 'logout' == self::$matched_route ) {
     235                            // No redirect, ask the user if they really want to log out.
     236                            return;
    234237                        } else if ( is_user_logged_in() ) {
    235                             if ( preg_match( '!^' . $this->valid_sso_paths['logout'] . '/?$!', $_SERVER['REQUEST_URI'] ) ) {
    236                                 // No redirect, ask the user if they really want to log out.
    237                                 return;
    238                             } else {
    239                                 // Otherwise, redirect to the login screen.
    240                                 $this->_redirect_to_profile();
    241                             }
     238                            // Otherwise, redirect to the their profile.
     239                            $this->_redirect_to_profile();
    242240                        }
    243241                    } elseif ( ( is_admin() && is_super_admin() ) || 0 === strpos( $_SERVER['REQUEST_URI'], '/wp-json' ) || 0 === strpos( $_SERVER['REQUEST_URI'], '/xmlrpc.php' ) ) {
Note: See TracChangeset for help on using the changeset viewer.