protected function rejoin() { $prompt_post = new Prompt_Post($this->post_id); if ($prompt_post->is_subscribed($this->user_id)) { return; } $prompt_post->subscribe($this->user_id); Prompt_Subscription_Mailing::send_rejoin_notification($this->user_id, $prompt_post); return; }
/** * Subscribe the user to comments on the post. * @since 1.0.0 * @param bool $notify Whether to send a subscription notification to the user */ protected function subscribe($notify = false) { $prompt_post = new Prompt_Post($this->post_id); if ($prompt_post->is_subscribed($this->user_id)) { return; } if (Prompt_Core::$options->get('auto_subscribe_authors') and $this->user_id == $prompt_post->get_wp_post()->post_author) { return; } $prompt_post->subscribe($this->user_id); if ($notify) { Prompt_Subscription_Mailing::send_subscription_notification($this->user_id, $prompt_post); } }