bp_notifications_check_notification_access( int $user_id, int $notification_id )

Check if a user has access to a specific notification.

Description

Used before deleting a notification for a user.

Parameters

$user_id

(int) (Required) ID of the user being checked.

$notification_id

(int) (Required) ID of the notification being checked.

Return

(bool) True if the notification belongs to the user, otherwise false.

Source

File: bp-notifications/bp-notifications-functions.php

function bp_notifications_check_notification_access( $user_id, $notification_id ) {
	return (bool) BP_Notifications_Notification::check_access( $user_id, $notification_id );
}

Changelog

Changelog
Version Description
BuddyPress 1.9.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.