Skip to:
Content

BuddyPress.org

Changeset 7584


Ignore:
Timestamp:
11/16/2013 07:26:33 PM (11 years ago)
Author:
boonebgorges
Message:

Use bp_loggedin_user_id() in bp_messages_get_notices()

The previous use of the $userdata global was causing problems for installations
that were doing funny things with userdata. In addition, the BP wrapper is more
standard for our codebase.

Fixes #5059

Props AliMH

File:
1 edited

Legend:

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

    r7530 r7584  
    633633
    634634function bp_message_get_notices() {
    635     global $userdata;
    636 
    637635    $notice = BP_Messages_Notice::get_active();
    638636
     
    640638        return false;
    641639
    642     $closed_notices = bp_get_user_meta( $userdata->ID, 'closed_notices', true );
     640    $closed_notices = bp_get_user_meta( bp_loggedin_user_id(), 'closed_notices', true );
    643641
    644642    if ( !$closed_notices )
Note: See TracChangeset for help on using the changeset viewer.