Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/27/2016 05:56:01 AM (8 years ago)
Author:
r-a-y
Message:

Notifications: Ensure moderators are able to manage a user's notifications.

Previously, due to hardcoded logged-in user checks, it was not possible
for moderators to manage a displayed user's notifications.

This commit adds a user ID parameter to all appropriate notification
template tag functions and sets some of those functions to default to the
displayed user ID where necessary. This will allow moderators to manage
a displayed user's notifications as intended.

Props r-a-y, VibeThemes.

Fixes #7023.

File:
1 edited

Legend:

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

    r10806 r10816  
    9999 */
    100100function bp_notifications_delete_notification( $id ) {
    101     if ( ! bp_notifications_check_notification_access( bp_loggedin_user_id(), $id ) ) {
     101    if ( ! bp_notifications_check_notification_access( bp_displayed_user_id(), $id ) ) {
    102102        return false;
    103103    }
     
    118118 */
    119119function bp_notifications_mark_notification( $id, $is_new = false ) {
    120     if ( ! bp_notifications_check_notification_access( bp_loggedin_user_id(), $id ) ) {
     120    if ( ! bp_notifications_check_notification_access( bp_displayed_user_id(), $id ) ) {
    121121        return false;
    122122    }
Note: See TracChangeset for help on using the changeset viewer.