Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress notification to multiple users


  • shekhar4431
    Participant

    @shekhar4431

    I am sending to notification to multiple users with following code

     bp_notifications_add_notification( array(
    	        'user_id'           => 3,1,
    	        'item_id'           =>$postid,
    	        'component_name'    => 'Event2',
    	        'component_action'  => 'custom_action',
    	        'date_notified'     => bp_core_current_time(),
    	        'is_new'            => 1,
    	    ) );

    but notification is only send to first user id 3. How I will send the notification to multiple user id. Please help

Viewing 3 replies - 1 through 3 (of 3 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    Hi there,
    You can use a loop to add notification for each user. The function you have mentioned is correct but accepts only one user at a time.
    Hope that points you in the right direction.


    shekhar4431
    Participant

    @shekhar4431

    Ok thanks. I have tried and it working.


    Brajesh Singh
    Participant

    @sbrajesh

    You are welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar