BP_Notifications_Notification::get_read_for_user( int $user_id )

Fetch all the read notifications in the database for a specific user.

Description

Parameters

$user_id

(Required) ID of the user whose notifications are being fetched.

Return

(array) Associative array of unread notification items.

Source

File: bp-notifications/classes/class-bp-notifications-notification.php

	public static function get_read_for_user( $user_id = 0 ) {
		return self::get( array(
			'user_id' => $user_id,
			'is_new'  => false,
		) );
	}

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.