Making WordPress.org


Ignore:
Timestamp:
10/22/2019 04:47:46 AM (5 years ago)
Author:
dd32
Message:

Slack: Correct the array indicies in [9221], these fields are nested under the profile key.

See r9221.
See #4747.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/common/includes/slack/announce/lib.php

    r9221 r9222  
    104104    // Use their Slack Display name, falling back to their WordPress.org login if that's not available.
    105105    $display_name = $user;
    106     if ( ! empty( $slack_profiledata['display_name'] ) ) {
    107         $display_name = $slack_profiledata['display_name'];
     106    if ( ! empty( $slack_profiledata['profile']['display_name'] ) ) {
     107        $display_name = $slack_profiledata['profile']['display_name'];
    108108    }
    109109
    110110    $avatar = false;
    111111    // Respect the avatar set in Slack, and prefer it over their Gravatar.
    112     if ( ! empty( $slack_profiledata['image_192'] ) ) {
    113         $avatar = $slack_profiledata['image_192'];
     112    if ( ! empty( $slack_profiledata['profile']['image_192'] ) ) {
     113        $avatar = $slack_profiledata['profile']['image_192'];
    114114    }
    115115    $get_avatar = __NAMESPACE__ . '\\' . 'get_avatar';
Note: See TracChangeset for help on using the changeset viewer.