Skip to:
Content

BuddyPress.org

Changeset 11751


Ignore:
Timestamp:
11/29/2017 05:31:29 PM (7 years ago)
Author:
djpaul
Message:

Activity: fix favouriting functions for CLI use.

Don't require authenticated user in favouriting functions, especially as the function accepts an optional $user_id parameter.

Fixes #7623

Props espellcaste

File:
1 edited

Legend:

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

    r11738 r11751  
    938938function bp_activity_add_user_favorite( $activity_id, $user_id = 0 ) {
    939939
    940     // Favorite activity stream items are for logged in users only.
    941     if ( ! is_user_logged_in() ) {
    942         return false;
    943     }
    944 
    945940    // Fallback to logged in user if no user_id is passed.
    946941    if ( empty( $user_id ) ) {
     
    10111006 */
    10121007function bp_activity_remove_user_favorite( $activity_id, $user_id = 0 ) {
    1013 
    1014     // Favorite activity stream items are for logged in users only.
    1015     if ( ! is_user_logged_in() ) {
    1016         return false;
    1017     }
    10181008
    10191009    // Fallback to logged in user if no user_id is passed.
Note: See TracChangeset for help on using the changeset viewer.