Skip to:
Content

BuddyPress.org

Changeset 3209


Ignore:
Timestamp:
08/21/2010 04:59:31 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2590

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-blogs.php

    r3192 r3209  
    457457                return false;
    458458
     459        // Don't record activity if no email address has been included
     460        if ( empty( $recorded_comment->comment_author_email ) )
     461                return false;
     462       
     463        // Get the user_id from the comment author email.
     464        $user = get_user_by_email( $recorded_comment->comment_author_email );
     465        $user_id = (int)$user->ID;
     466
     467        // If there's no registered user id, don't record activity
     468        if ( empty( $user_id ) )
     469                return false;
     470
    459471        // Get blog and post data
    460472        $blog_id = (int)$wpdb->blogid;
    461473        $recorded_comment->post = get_post( $recorded_comment->comment_post_ID );
    462 
    463         // Get the user_id from the comment author email.
    464         $user = get_user_by_email( $recorded_comment->comment_author_email );
    465         $user_id = (int)$user->ID;
    466 
    467         // If there's no registered user id, don't record activity
    468         if ( empty( $user_id ) )
    469                 return false;
    470474
    471475        // If this is a password protected post, don't record the comment
Note: See TracChangeset for help on using the changeset viewer.