Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
606 views
in Q2A Core by
reshown by
When someone posts answer to my questions I receive emails which could be thousands in number , how could I turn of email sending features for certain users or if I can go to my account and turn off this feature . Or is there way to disable auto email subscriptions feature for when questions are posted or questions are answered? I don’t want this to be turned off from questions page but from some admin section of website.
by
I think it's the checkbox 'Email me if my question is answered or commented on', above the button 'Ask the question' (when posting questions) or 'Save Changes' (when editing questions)
by
+1
I have already posted hundreds of questions, I don’t want to go on each questions, it’s very time consuming process, I want to disable from one place

1 Answer

0 votes
by

To disable the email checkbox when asking, override this function in your theme

public function initialize() {
    if ($this->template === 'ask') {
        unset($this->content['form']['fields']['notify']);
    }
    parent::initialize();
}

For old questions with tick marks, you may want to use PHPMyadmin, and do some MySQL queries to replace the notify column value in qa_posts.

by
Maybe when someone edit his own questions, the email checkbox reappears. If that's the case, adjust something like:

public function initialize() {
    if (($this->template == 'ask') || ($this->template == 'question')) {
        unset($this->content['form']['fields']['notify']);
    }
    parent::initialize();
}

Correct my syntax errors.
...