Making WordPress.org


Ignore:
Timestamp:
06/21/2021 05:36:48 AM (5 years ago)
Author:
dd32
Message:

Login: When a user is logged in, or an account creation link has already been used, redirect the user more appropriately to a page explaining the issue.

This removes a "random" redirect on certain Login pages that would result in the user redirected to the WordPress.org homepage, or support forums, with no further explanation.

Fixes #5754.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/pending-create.php

    r10981 r11046  
    2626}
    2727
     28// Already logged in.. Warn about duplicate accounts, etc.
     29if ( is_user_logged_in() && $activation_user != wp_get_current_user()->user_login ) {
     30        wp_safe_redirect( home_url( '/linkexpired/register-logged-in' ) );
     31        exit;
     32}
     33
    2834$can_access = false;
    2935if ( $pending_user && $pending_user['user_activation_key'] && ! $pending_user['created'] ) {
    … …  
    4248        }
    4349} elseif ( $pending_user && $pending_user['created'] ) {
    44         wp_safe_redirect( 'https://wordpress.org/support/' );
     50        wp_safe_redirect( home_url( '/linkexpired/account-created/' . urlencode( $pending_user['user_login'] ) ) );
    4551        die();
    4652}
    4753
    4854if ( ! $can_access ) {
    49         wp_safe_redirect( '/' );
     55        wp_safe_redirect( '/linkexpired' );
    5056        die();
    5157}
Note: See TracChangeset for help on using the changeset viewer.