Changeset 14022
- Timestamp:
- 09/05/2024 01:38:41 AM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r13755 r14022 2 2 3 3 namespace WordPressdotorg\Forums; 4 5 use function WordPressdotorg\Two_Factor\get_edit_account_url; 4 6 5 7 class Hooks { … … 363 365 global $wp_query, $wp; 364 366 367 // Account information is no longer set in the support forums. 368 // We don't use `wp_get_current_user()` because super admins often reset data for other users. 369 if ( preg_match( '!^users/(?P<username>[^/]+)/edit/account!i', $wp->request, $matches ) ) { 370 $url = get_edit_account_url( get_user_by( 'slug', $matches['username'] ) ); 371 wp_safe_redirect( $url, 301 ); 372 exit; 373 }; 374 365 375 // A user called 'profile' exists, but override it. 366 376 if ( 'profile' === get_query_var( 'bbp_user' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.