Skip to:
Content

BuddyPress.org

Changeset 11844


Ignore:
Timestamp:
02/04/2018 05:51:58 PM (7 years ago)
Author:
espellcaste
Message:

Remove redundant handling of optional $user_id parameter from messages_check_thread_access()

On messages_check_thread_access(), we are checking if the $user_id parameter is set. The same check is being done on BP_Messages_Thread::check_access().

So we are keeping only the low level check, instead of both.

Props DjPaul.

Fixes #7668

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-functions.php

    r11578 r11844  
    316316 */
    317317function messages_check_thread_access( $thread_id, $user_id = 0 ) {
    318     if ( empty( $user_id ) ) {
    319         $user_id = bp_loggedin_user_id();
    320     }
    321 
    322318    return BP_Messages_Thread::check_access( $thread_id, $user_id );
    323319}
Note: See TracChangeset for help on using the changeset viewer.