Changeset 4120 for sites/trunk/common/includes/wporg-sso/wp-plugin.php
- Timestamp:
- 09/23/2016 05:40:45 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/common/includes/wporg-sso/wp-plugin.php
r4118 r4120 48 48 // Not in list of targeted domains, not interested, bail out 49 49 return; 50 } 51 52 // Extend paths which are only available for logged in users. 53 if ( is_user_logged_in() ) { 54 $this->valid_sso_paths['logout'] = '/logout'; 50 55 } 51 56 … … 117 122 } 118 123 } else if ( is_user_logged_in() ) { 119 // Otherwise, redirect to the login screen. 120 $this->_redirect_to_profile(); 124 if ( preg_match( '!^' . $this->valid_sso_paths['logout'] . '/?$!', $_SERVER['REQUEST_URI'] ) ) { 125 // No redirect, ask the user if they really want to log out. 126 return; 127 } else { 128 // Otherwise, redirect to the login screen. 129 $this->_redirect_to_profile(); 130 } 121 131 } 122 132 } elseif ( is_user_logged_in() ) {
Note: See TracChangeset
for help on using the changeset viewer.