Making WordPress.org


Ignore:
Timestamp:
12/19/2024 04:12:32 AM (20 months ago)
Author:
dd32
Message:

Support Forums: When a user has multiple linked Slack accounts, only list the first non-deactivated one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php

    r14176 r14316  
    728728        $data = wp_cache_get( "user_id:$user_id", 'slack_data' );
    729729        if ( false === $data ) {
    730                 $data = $wpdb->get_var( $wpdb->prepare( "SELECT profiledata FROM slack_users WHERE user_id = %d", $user_id ) );
     730                $data = $wpdb->get_var( $wpdb->prepare( "SELECT profiledata FROM slack_users WHERE user_id = %d ORDER BY deactivated ASC LIMIT 1", $user_id ) );
    731731
    732732                // Cache nonexistence as an empty string.
Note: See TracChangeset for help on using the changeset viewer.