Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/24/2013 09:46:41 PM (8 years ago)
Author:
netweb
Message:

Protect topic and reply author link calls from non-existant users. Props jondavidjohn. Fixes #2381

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/template.php

    r5177 r5180  
    12321232            $link_class = ' class="bbp-author-' . esc_attr( $r['type'] ) . '"';
    12331233
    1234             // Add links if not anonymous
     1234            // Add links if not anonymous and existing user
    12351235            if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) {
    12361236
     
    12801280     * @uses bbp_is_reply_anonymous() To check if the reply is by an anonymous
    12811281     *                                 user
     1282     * @uses bbp_user_has_profile() To check if the user has a profile
    12821283     * @uses bbp_get_reply_author_id() To get the reply author id
    12831284     * @uses bbp_get_user_profile_url() To get the user profile url
     
    12901291        $reply_id = bbp_get_reply_id( $reply_id );
    12911292
    1292         // Check for anonymous user
    1293         if ( !bbp_is_reply_anonymous( $reply_id ) ) {
     1293        // Check for anonymous user or non-existant user
     1294        if ( !bbp_is_reply_anonymous( $reply_id ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) {
    12941295            $author_url = bbp_get_user_profile_url( bbp_get_reply_author_id( $reply_id ) );
    12951296        } else {
Note: See TracChangeset for help on using the changeset viewer.