Skip to:
Content

BuddyPress.org

Changeset 8477


Ignore:
Timestamp:
06/04/2014 11:43:49 PM (10 years ago)
Author:
boonebgorges
Message:

Check user properties before attempting to use in bp_get_activity_user_link()

This prevents PHP notices when users have been incompletely deleted from the DB.

Fixes #5685

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-template.php

    r8429 r8477  
    11401140        global $activities_template;
    11411141
    1142         if ( empty( $activities_template->activity->user_id ) )
     1142        if ( empty( $activities_template->activity->user_id ) || empty( $activities_template->activity->user_nicename ) || empty( $activities_template->activity->user_login ) ) {
    11431143            $link = $activities_template->activity->primary_link;
    1144         else
     1144        } else {
    11451145            $link = bp_core_get_user_domain( $activities_template->activity->user_id, $activities_template->activity->user_nicename, $activities_template->activity->user_login );
     1146        }
    11461147
    11471148        return apply_filters( 'bp_get_activity_user_link', $link );
Note: See TracChangeset for help on using the changeset viewer.