bp_friends_friendship_requested_notification( int $friendship_id, int $initiator_user_id, int $friend_user_id )

Notify one use that another user has requested their virtual friendship.

Parameters Parameters


(int) (Required) The unique ID of the friendship.


(int) (Required) The friendship initiator user ID.


(int) (Required) The friendship request receiver user ID.

Source Source

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

function bp_friends_friendship_requested_notification( $friendship_id, $initiator_user_id, $friend_user_id ) {
	bp_notifications_add_notification( array(
		'user_id'           => $friend_user_id,
		'item_id'           => $initiator_user_id,
		'secondary_item_id' => $friendship_id,
		'component_name'    => buddypress()->friends->id,
		'component_action'  => 'friendship_request',
		'date_notified'     => bp_core_current_time(),
		'is_new'            => 1,
	) );

Top ↑

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.