BP_Notifications_Notification::get_unread_for_user( int $user_id )

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


Description Description


Parameters Parameters

$user_id

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


Top ↑

Return Return

(array) Associative array of unread notification items.


Top ↑

Source Source

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
1.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.