diff --git a/includes/admin/class-users-columns.php b/includes/admin/class-users-columns.php index 994fd77f..d6d3c22b 100644 --- a/includes/admin/class-users-columns.php +++ b/includes/admin/class-users-columns.php @@ -133,7 +133,12 @@ if ( ! class_exists( 'um\admin\Users_Columns' ) ) { admin_url( 'users.php' ) ); - $row_actions[] = '' . esc_html__( 'Resend activation email', 'ultimate-member' ) . ''; + $title = __( 'Send activation email', 'ultimate-member' ); + if ( UM()->common()->users()->has_status( $user_id, 'awaiting_email_confirmation' ) ) { + $title = __( 'Resend activation email', 'ultimate-member' ); + } + + $row_actions[] = '' . esc_html( $title ) . ''; } if ( UM()->common()->users()->can_be_deactivated( $user_id ) ) { $url = add_query_arg( diff --git a/includes/common/class-users.php b/includes/common/class-users.php index c3a7988c..ef97d5a1 100644 --- a/includes/common/class-users.php +++ b/includes/common/class-users.php @@ -634,7 +634,7 @@ class Users { }*/ $status = $this->get_status( $user_id ); - return 'approved' !== $status; + return 'approved' !== $status && 'inactive' !== $status; // inactive can be only reactivated } /** diff --git a/includes/frontend/class-users.php b/includes/frontend/class-users.php index b9257d94..58c93dcd 100644 --- a/includes/frontend/class-users.php +++ b/includes/frontend/class-users.php @@ -43,7 +43,11 @@ class Users { $actions['put_user_as_pending'] = array( 'label' => __( 'Put as Pending Review', 'ultimate-member' ) ); } if ( UM()->common()->users()->can_activation_send( $user_id ) ) { - $actions['resend_user_activation'] = array( 'label' => __( 'Resend Activation Email', 'ultimate-member' ) ); + $title = __( 'Send activation email', 'ultimate-member' ); + if ( UM()->common()->users()->has_status( $user_id, 'awaiting_email_confirmation' ) ) { + $title = __( 'Resend activation email', 'ultimate-member' ); + } + $actions['resend_user_activation'] = array( 'label' => $title ); } if ( UM()->common()->users()->can_be_deactivated( $user_id ) ) { $actions['deactivate_user'] = array( 'label' => __( 'Deactivate this account', 'ultimate-member' ) );