Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 01:24:47 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Use bp_loggedin_user_id() rather than reference the $bp->logged_user->id global var directly. Second step at consolidating user ID checks to use WP_User class later. See #3738.

File:
1 edited

Legend:

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

    r4961 r5302  
    1414
    1515    $defaults = array (
    16         'sender_id'  => $bp->loggedin_user->id,
     16        'sender_id'  => bp_loggedin_user_id(),
    1717        'thread_id'  => false, // false for a new message, thread id for a reply to a thread.
    1818        'recipients' => false, // Can be an array of usernames, user_ids or mixed.
     
    168168
    169169    if ( empty( $user_id ) )
    170         $user_id = $bp->loggedin_user->id;
     170        $user_id = bp_loggedin_user_id();
    171171
    172172    return BP_Messages_Thread::check_access( $thread_id, $user_id );
     
    197197
    198198    if ( empty( $user_id ) )
    199         $user_id = $bp->loggedin_user->id;
     199        $user_id = bp_loggedin_user_id();
    200200
    201201    return BP_Messages_Thread::get_inbox_count( $user_id );
Note: See TracChangeset for help on using the changeset viewer.