Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/12/2021 10:05:17 PM (3 years ago)
Author:
johnjamesjacoby
Message:

Users: add some error checking to get_userdata() calls in profile link functions.

This change ensures that when attempting to link to user profiles when the display_name is the inner HTML of the link, that the "Anonymous" alternate is used whenever the user cannot be found.

It also bails early – returning false – if the user account simply does not exist, consistent with upstream calls to bbp_get_user_id(). (Functions calling these functions have a responsibility to appropriately handle boolean return values.)

In branches/2.6, for 2.6.7.

See #3440.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/extend/buddypress/activity.php

    r7188 r7213  
    385385
    386386        // User link for topic author
    387         $user_link = bbp_get_user_profile_link( $user_id  );
     387        $user_link = bbp_get_user_profile_link( $user_id );
    388388
    389389        // Topic
     
    520520
    521521        // Setup links for activity stream
    522         $user_link = bbp_get_user_profile_link( $user_id  );
     522        $user_link = bbp_get_user_profile_link( $user_id );
    523523
    524524        // Reply
Note: See TracChangeset for help on using the changeset viewer.