HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to stop sending notification email in a custom plugin


I created a plugin that requires notification. All works fine except it keeps sending email notification even if its turned off in the configuration. Is there something I missed? Please see details below...

This is how I defined it in the plugin...

In the structure I create a new activity type like this

 public function structure(){
       $activityModel = new ActivityModel();

               'ProfileHeadline'=>'%1$s joined your team.',
               'FullHeadline'=>'%1$s joined your team.',

then I call this in the setup and also set initial configuration

public function setup(){

I add it in the preferences

 public function profileController_afterPreferencesDefined_handler($sender){
   $sender->Preferences['Notifications']['Email.JoinTeam']=t('Notify me when someone joins my team.');
   $sender->Preferences['Notifications']['Popup.JoinTeam']=t('Notify me whensomeone joins myteam.');

Then I call this method to send notification where $activityType = 'JoinTeam'

   function sendNotification($route,$userIdNotifier,$userIdReciever,$activityType){



Sign In or Register to comment.