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/topics/template.php

    r5157 r5180  
    15511551     * @uses bbp_is_topic_anonymous() To check if the topic is by an anonymous
    15521552     *                                 user or not
     1553     * @uses bbp_user_has_profile() To check if the user has a profile
    15531554     * @uses bbp_get_topic_author_id() To get topic author id
    15541555     * @uses bbp_get_user_profile_url() To get profile url
     
    15611562        $topic_id = bbp_get_topic_id( $topic_id );
    15621563
    1563         // Check for anonymous user
    1564         if ( !bbp_is_topic_anonymous( $topic_id ) ) {
     1564        // Check for anonymous user or non-existant user
     1565        if ( !bbp_is_topic_anonymous( $topic_id ) && bbp_user_has_profile( bbp_get_topic_author_id( $topic_id ) ) ) {
    15651566            $author_url = bbp_get_user_profile_url( bbp_get_topic_author_id( $topic_id ) );
    15661567        } else {
Note: See TracChangeset for help on using the changeset viewer.